mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Update test file exclusive.test so that it works with the "journaltest" permutation.
FossilOrigin-Name: 4daf94d83319231e42243625c804d5db2d14f10fa5ea1a1f358c3603c47b955b
This commit is contained in:
@@ -512,21 +512,27 @@ do_execsql_test exclusive-6.5 {
|
||||
} {exclusive}
|
||||
|
||||
# 2019-12-26 ticket fb3b3024ea238d5c
|
||||
do_test exclusive-7.1 {
|
||||
db close
|
||||
forcedelete test.db test.db-journal test.db-wal
|
||||
sqlite3 db test.db
|
||||
# The following sequence of pragmas would trigger an assert()
|
||||
# associated with Pager.changeCountDone inside of assert_pager_state(),
|
||||
# prior to the fix.
|
||||
db eval {
|
||||
PRAGMA locking_mode = EXCLUSIVE;
|
||||
PRAGMA journal_mode = WAL;
|
||||
PRAGMA locking_mode = NORMAL;
|
||||
PRAGMA user_version;
|
||||
PRAGMA journal_mode = DELETE;
|
||||
}
|
||||
} {exclusive wal normal 0 delete}
|
||||
if {[permutation]!="journaltest"} {
|
||||
# The custom VFS used by the "journaltest" permutation cannot open the
|
||||
# shared-memory file. So, while it is able to switch the db file to
|
||||
# journal_mode=WAL when locking_mode=EXCLUSIVE, it can no longer access
|
||||
# it once the locking_mode is changed back to NORMAL.
|
||||
do_test exclusive-7.1 {
|
||||
db close
|
||||
forcedelete test.db test.db-journal test.db-wal
|
||||
sqlite3 db test.db
|
||||
# The following sequence of pragmas would trigger an assert()
|
||||
# associated with Pager.changeCountDone inside of assert_pager_state(),
|
||||
# prior to the fix.
|
||||
db eval {
|
||||
PRAGMA locking_mode = EXCLUSIVE;
|
||||
PRAGMA journal_mode = WAL;
|
||||
PRAGMA locking_mode = NORMAL;
|
||||
PRAGMA user_version;
|
||||
PRAGMA journal_mode = DELETE;
|
||||
}
|
||||
} {exclusive wal normal 0 delete}
|
||||
}
|
||||
|
||||
|
||||
} ;# atomic_batch_write==0
|
||||
|
Reference in New Issue
Block a user