Update error message text for standard error codes to better describe the
latest usage of those error codes. Modify sqlite3_open_v2() so that it does return a valid sqlite3 object in the event of SQLITE_MISUSE due to bad open flags, so that sqlite3_errmsg() does not report "out of memory" in that case. FossilOrigin-Name: f27b6370407842e2c175ea4aa9ce018723c57eaac0cccc1f8399bc20f33324be
This commit is contained in:
+6
-6
@@ -187,11 +187,11 @@ if {[clang_sanitize_address]==0} {
|
||||
} {SQLITE_MISUSE}
|
||||
do_test capi3-3.6.2-misuse {
|
||||
sqlite3_errmsg $db2
|
||||
} {library routine called out of sequence}
|
||||
} {bad parameter or other API misuse}
|
||||
ifcapable {utf16} {
|
||||
do_test capi3-3.6.3-misuse {
|
||||
utf8 [sqlite3_errmsg16 $db2]
|
||||
} {library routine called out of sequence}
|
||||
} {bad parameter or other API misuse}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -771,7 +771,7 @@ set code2english [list \
|
||||
SQLITE_OK {not an error} \
|
||||
SQLITE_ERROR {SQL logic error} \
|
||||
SQLITE_PERM {access permission denied} \
|
||||
SQLITE_ABORT {callback requested query abort} \
|
||||
SQLITE_ABORT {query aborted} \
|
||||
SQLITE_BUSY {database is locked} \
|
||||
SQLITE_LOCKED {database table is locked} \
|
||||
SQLITE_NOMEM {out of memory} \
|
||||
@@ -784,10 +784,10 @@ SQLITE_CANTOPEN {unable to open database file} \
|
||||
SQLITE_SCHEMA {database schema has changed} \
|
||||
SQLITE_CONSTRAINT {constraint failed} \
|
||||
SQLITE_MISMATCH {datatype mismatch} \
|
||||
SQLITE_MISUSE {library routine called out of sequence} \
|
||||
SQLITE_MISUSE {bad parameter or other API misuse} \
|
||||
SQLITE_AUTH {authorization denied} \
|
||||
SQLITE_RANGE {bind or column index out of range} \
|
||||
SQLITE_NOTADB {file is encrypted or is not a database} \
|
||||
SQLITE_RANGE {column index out of range} \
|
||||
SQLITE_NOTADB {file is not a database} \
|
||||
unknownerror {unknown error} \
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user