1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Revert sqlite3_close() to legacy behavior. Create a new sqlite3_close_v2()

interface that exhibits the deferred-close behavior.  This minimizes the
chance of breakage in legacy apps.

FossilOrigin-Name: c4b8621125ce77308b06692d92f70586b10055a9
This commit is contained in:
drh
2012-06-02 17:09:46 +00:00
parent 4245c405ea
commit 167cd6ab78
8 changed files with 110 additions and 53 deletions

View File

@@ -419,8 +419,11 @@ do_test backup-4.3.1 {
} {B}
do_test backup-4.3.2 {
db2 cache flush
db2 close ;# close will be deferred until the backup finishes
} {}
sqlite3_close db2
} {SQLITE_BUSY}
do_test backup-4.3.3 {
sqlite3_errmsg db2
} {unable to close due to unfinalized statements or unfinished backups}
do_test backup-4.3.4 {
B step 50
} {SQLITE_DONE}
@@ -433,7 +436,7 @@ do_test backup-4.4.1 {
list $rc [sqlite3_errcode db] [sqlite3_errmsg db]
} {1 SQLITE_ERROR {source and destination must be distinct}}
db close
db2 close
do_test backup-4.5.1 {
catch { forcedelete test.db }