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.

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.
check-in: f27b6370 user: drh tags: trunk

# any time and from any thread
#do_test shared_err-misuse-7.1 {
# sqlite3 db test.db
# catch {
# sqlite3_enable_shared_cache 0
# } msg
# set msg
#} {library routine called out of sequence}
# Again provoke a malloc() failure when a cursor position is being saved,
# this time during a ROLLBACK operation by some other handle.
#
# The library should return an SQLITE_NOMEM to the caller. The query that
# owns the cursor (the one for which the position is not saved) should
# be aborted.

|

374
375
376
377
378
379
380
381
382
383
384
385
386
387
388

# any time and from any thread
#do_test shared_err-misuse-7.1 {
# sqlite3 db test.db
# catch {
# sqlite3_enable_shared_cache 0
# } msg
# set msg
#} {bad parameter or other API misuse}
# Again provoke a malloc() failure when a cursor position is being saved,
# this time during a ROLLBACK operation by some other handle.
#
# The library should return an SQLITE_NOMEM to the caller. The query that
# owns the cursor (the one for which the position is not saved) should
# be aborted.