mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
If a call to sqlite3_snapshot_open() fails because the requested snapshot no
longer exists, return SQLITE_ERROR_SNAPSHOT instead of SQLITE_BUSY_SNAPSHOT. FossilOrigin-Name: e07923128bb164efbafde29d49175b61f2ef44b2dfac5ae4ed61937945dfcf4c
This commit is contained in:
@ -258,7 +258,7 @@ foreach {tn tcl} {
|
||||
} {}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Check that SQLITE_BUSY_SNAPSHOT is returned if the specified snapshot
|
||||
# Check that SQLITE_ERROR_SNAPSHOT is returned if the specified snapshot
|
||||
# no longer exists because the wal file has been checkpointed.
|
||||
#
|
||||
# 1. Reading a snapshot from the middle of a wal file is not possible
|
||||
@ -296,7 +296,7 @@ foreach {tn tcl} {
|
||||
BEGIN;
|
||||
}
|
||||
list [catch {snapshot_open db main $snapshot} msg] $msg
|
||||
} {1 SQLITE_BUSY_SNAPSHOT}
|
||||
} {1 SQLITE_ERROR_SNAPSHOT}
|
||||
do_test $tn.4.1.4 {
|
||||
snapshot_free $snapshot
|
||||
execsql COMMIT
|
||||
@ -327,7 +327,7 @@ foreach {tn tcl} {
|
||||
BEGIN;
|
||||
}
|
||||
list [catch {snapshot_open db main $snapshot} msg] $msg
|
||||
} {1 SQLITE_BUSY_SNAPSHOT}
|
||||
} {1 SQLITE_ERROR_SNAPSHOT}
|
||||
do_test $tn.4.2.4 {
|
||||
snapshot_free $snapshot
|
||||
} {}
|
||||
|
Reference in New Issue
Block a user