mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Modify test cases to account for the ZERO_DAMAGE change.
FossilOrigin-Name: 68684495f1a62a41ad27934f3a6d3bc9d290a57d
This commit is contained in:
@ -1040,7 +1040,7 @@ foreach {tn ckpt_cmd ckpt_res ckpt_main ckpt_aux} {
|
||||
5 {sqlite3_wal_checkpoint db aux} SQLITE_OK 0 1
|
||||
6 {sqlite3_wal_checkpoint db temp} SQLITE_OK 0 0
|
||||
7 {db eval "PRAGMA main.wal_checkpoint"} {0 10 10} 1 0
|
||||
8 {db eval "PRAGMA aux.wal_checkpoint"} {0 16 16} 0 1
|
||||
8 {db eval "PRAGMA aux.wal_checkpoint"} {0 13 13} 0 1
|
||||
9 {db eval "PRAGMA temp.wal_checkpoint"} {0 -1 -1} 0 0
|
||||
} {
|
||||
do_test wal-16.$tn.1 {
|
||||
@ -1054,7 +1054,8 @@ foreach {tn ckpt_cmd ckpt_res ckpt_main ckpt_aux} {
|
||||
PRAGMA aux.auto_vacuum = 0;
|
||||
PRAGMA main.journal_mode = WAL;
|
||||
PRAGMA aux.journal_mode = WAL;
|
||||
PRAGMA synchronous = NORMAL;
|
||||
PRAGMA main.synchronous = NORMAL;
|
||||
PRAGMA aux.synchronous = NORMAL;
|
||||
}
|
||||
} {wal wal}
|
||||
|
||||
@ -1072,7 +1073,7 @@ foreach {tn ckpt_cmd ckpt_res ckpt_main ckpt_aux} {
|
||||
} [list [expr 1*1024] [wal_file_size 10 1024]]
|
||||
do_test wal-16.$tn.3 {
|
||||
list [file size test2.db] [file size test2.db-wal]
|
||||
} [list [expr 1*1024] [wal_file_size 16 1024]]
|
||||
} [list [expr 1*1024] [wal_file_size 13 1024]]
|
||||
|
||||
do_test wal-16.$tn.4 [list eval $ckpt_cmd] $ckpt_res
|
||||
|
||||
@ -1082,7 +1083,7 @@ foreach {tn ckpt_cmd ckpt_res ckpt_main ckpt_aux} {
|
||||
|
||||
do_test wal-16.$tn.6 {
|
||||
list [file size test2.db] [file size test2.db-wal]
|
||||
} [list [expr ($ckpt_aux ? 7 : 1)*1024] [wal_file_size 16 1024]]
|
||||
} [list [expr ($ckpt_aux ? 7 : 1)*1024] [wal_file_size 13 1024]]
|
||||
|
||||
catch { db close }
|
||||
}
|
||||
@ -1552,9 +1553,13 @@ ifcapable autovacuum {
|
||||
}
|
||||
file size test.db
|
||||
} [expr 3 * 1024]
|
||||
|
||||
# WAL file now contains a single frame - the new root page for table t1.
|
||||
# It would be two frames (the new root page and a padding frame) if the
|
||||
# ZERO_DAMAGE flag were not set.
|
||||
do_test 24.5 {
|
||||
file size test.db-wal
|
||||
} 2128
|
||||
} [wal_file_size 1 1024]
|
||||
}
|
||||
|
||||
db close
|
||||
|
Reference in New Issue
Block a user