1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Ensure the "PRAGMA journal_mode=WAL" works coming from any other journal_mode

with ATTACH-ed databases.

FossilOrigin-Name: e54330b43127e46fc6494748cbb353a6fc91cfd7
This commit is contained in:
drh
2014-04-04 14:12:52 +00:00
parent c438df1be0
commit 1fb6a11072
4 changed files with 22 additions and 11 deletions

View File

@ -1574,4 +1574,17 @@ sqlite3_shutdown
test_sqlite3_log
sqlite3_initialize
# Make sure PRAGMA journal_mode=WAL works with ATTACHED databases in
# all journal modes.
#
foreach mode {OFF MEMORY PERSIST DELETE TRUNCATE WAL} {
delete_file test.db test2.db
sqlite3 db test.db
do_test wal-25.$mode {
db eval "PRAGMA journal_mode=$mode"
db eval {ATTACH 'test2.db' AS t2; PRAGMA journal_mode=WAL;}
} {wal}
db close
}
finish_test