mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
The sqlite3_close() interface returns SQLITE_OK even if there are outstanding
sqlite3_stmt and sqlite3_backup objects. The connection becomes a zombie. Resource deallocation is deferred until the last sqlite3_stmt or sqlite3_backup object closes. This is intended to help SQLite play nicer with garbage collectors. FossilOrigin-Name: e276a02b7f54e804caa553dca99023416a415e1c
This commit is contained in:
@ -419,11 +419,8 @@ do_test backup-4.3.1 {
|
||||
} {B}
|
||||
do_test backup-4.3.2 {
|
||||
db2 cache flush
|
||||
sqlite3_close db2
|
||||
} {SQLITE_BUSY}
|
||||
do_test backup-4.3.3 {
|
||||
sqlite3_errmsg db2
|
||||
} {unable to close due to unfinished backup operation}
|
||||
db2 close ;# close will be deferred until the backup finishes
|
||||
} {}
|
||||
do_test backup-4.3.4 {
|
||||
B step 50
|
||||
} {SQLITE_DONE}
|
||||
@ -436,7 +433,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 }
|
||||
|
Reference in New Issue
Block a user