1
0
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:
dan
2011-12-19 10:07:56 +00:00
parent 1eaaf93a83
commit 0774bb59c6
7 changed files with 60 additions and 47 deletions

View File

@ -197,9 +197,9 @@ foreach {testprefix do_wal_checkpoint} {
INSERT INTO t2 VALUES(1, 2);
}
} {}
do_test 2.2.$tn.2 { file_page_counts } {1 5 1 5}
do_test 2.1.$tn.3 { code1 { do_wal_checkpoint db } } {0 5 5}
do_test 2.1.$tn.4 { file_page_counts } {2 5 2 5}
do_test 2.2.$tn.2 { file_page_counts } {1 3 1 3}
do_test 2.1.$tn.3 { code1 { do_wal_checkpoint db } } {0 3 3}
do_test 2.1.$tn.4 { file_page_counts } {2 3 2 3}
}
do_multiclient_test tn {
@ -213,10 +213,10 @@ foreach {testprefix do_wal_checkpoint} {
INSERT INTO t2 VALUES(3, 4);
}
} {}
do_test 2.2.$tn.2 { file_page_counts } {1 5 1 7}
do_test 2.2.$tn.2 { file_page_counts } {1 3 1 4}
do_test 2.2.$tn.3 { sql2 { BEGIN; SELECT * FROM t1 } } {1 2}
do_test 2.2.$tn.4 { code1 { do_wal_checkpoint db -mode restart } } {1 5 5}
do_test 2.2.$tn.5 { file_page_counts } {2 5 2 7}
do_test 2.2.$tn.4 { code1 { do_wal_checkpoint db -mode restart } } {1 3 3}
do_test 2.2.$tn.5 { file_page_counts } {2 3 2 4}
}
do_multiclient_test tn {
@ -229,13 +229,13 @@ foreach {testprefix do_wal_checkpoint} {
INSERT INTO t2 VALUES(1, 2);
}
} {}
do_test 2.3.$tn.2 { file_page_counts } {1 5 1 5}
do_test 2.3.$tn.2 { file_page_counts } {1 3 1 3}
do_test 2.3.$tn.3 { sql2 { BEGIN; SELECT * FROM t1 } } {1 2}
do_test 2.3.$tn.4 { sql1 { INSERT INTO t1 VALUES(3, 4) } } {}
do_test 2.3.$tn.5 { sql1 { INSERT INTO t2 VALUES(3, 4) } } {}
do_test 2.3.$tn.6 { file_page_counts } {1 7 1 7}
do_test 2.3.$tn.7 { code1 { do_wal_checkpoint db -mode full } } {1 7 5}
do_test 2.3.$tn.8 { file_page_counts } {1 7 2 7}
do_test 2.3.$tn.6 { file_page_counts } {1 4 1 4}
do_test 2.3.$tn.7 { code1 { do_wal_checkpoint db -mode full } } {1 4 3}
do_test 2.3.$tn.8 { file_page_counts } {1 4 2 4}
}
# Check that checkpoints block on the correct locks. And respond correctly
@ -256,18 +256,18 @@ foreach {testprefix do_wal_checkpoint} {
# processes holding all three types of locks.
#
foreach {tn1 checkpoint busy_on ckpt_expected expected} {
1 PASSIVE - {0 5 5} -
2 TYPO - {0 5 5} -
1 PASSIVE - {0 3 3} -
2 TYPO - {0 3 3} -
3 FULL - {0 7 7} 2
4 FULL 1 {1 5 5} 1
5 FULL 2 {1 7 5} 2
6 FULL 3 {0 7 7} 2
3 FULL - {0 4 4} 2
4 FULL 1 {1 3 3} 1
5 FULL 2 {1 4 3} 2
6 FULL 3 {0 4 4} 2
7 RESTART - {0 7 7} 3
8 RESTART 1 {1 5 5} 1
9 RESTART 2 {1 7 5} 2
10 RESTART 3 {1 7 7} 3
7 RESTART - {0 4 4} 3
8 RESTART 1 {1 3 3} 1
9 RESTART 2 {1 4 3} 2
10 RESTART 3 {1 4 4} 3
} {
do_multiclient_test tn {