-C Some\sfixes\sto\sthe\stest\ssuite\sso\sthat\sit\sworks\swith\sZERO_DAMAGE\sset\sto\strue.\nStill\slots\smore\sproblems\sremain.
-D 2011-12-19T00:31:09.781
+C Modify\stest\scases\sto\saccount\sfor\sthe\sZERO_DAMAGE\schange.
+D 2011-12-19T10:07:56.428
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F test/subquery2.test edcad5c118f0531c2e21bf16a09bbb105252d4cd
F test/subselect.test d24fd8757daf97dafd2e889c73ea4c4272dcf4e4
F test/substr.test 18f57c4ca8a598805c4d64e304c418734d843c1a
-F test/superlock.test 7b1167925e9d30a5d1f0701d24812fdda42c3a86
+F test/superlock.test 1cde669f68d2dd37d6c9bd35eee1d95491ae3fc2
F test/sync.test a34cd43e98b7fb84eabbf38f7ed8f7349b3f3d85
F test/syscall.test 265cda616f56a297406728ee1e74c9b4a93aa6dd
F test/sysfault.test c79441d88d23696fbec7b147dba98d42a04f523f
F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5
F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
F test/vtab_shared.test 0eff9ce4f19facbe0a3e693f6c14b80711a4222d
-F test/wal.test 626ada15351fb27838f4a6e3047f34b1491286b1
-F test/wal2.test 29e2cbe840582fc6efd0487b4f6337caed4b3e80
-F test/wal3.test 29a6e8843e5f5fd13f33cb0407d2923107020d32
+F test/wal.test edefe316b4125d7f68004ea53c5e73c398d436cc
+F test/wal2.test f11883dd3cb7f647c5d2acfd7b5c6d4ba5770cc9
+F test/wal3.test 0f9bb79aa5712e9fa2343d1cdc9e2785adddcfc2
F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c
-F test/wal5.test 1bbfaa316dc2a1d0d1fac3f4500c38a90055a41b
+F test/wal5.test f58ed4b8b542f71c7441da12fbd769d99b362437
F test/wal6.test 2e3bc767d9c2ce35c47106148d43fcbd072a93b3
F test/wal7.test 2ae8f427d240099cc4b2dfef63cff44e2a68a1bd
F test/wal_common.tcl a98f17fba96206122eff624db0ab13ec377be4fe
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
-P 1dde96c9ee88af1c4e37c2e65acb7c0fe6a20e2a
-R 62e195e48920f4d65e051058065d4cbf
-U drh
-Z 81e91113a96aa8ccbd0fc3b095654fd3
+P 41891b231e20a1d32b1d7449e7863470eb38ca0a
+R b6f691c6a328a432146fee6719bfa23f
+U dan
+Z d70b0c6ac6bdf4b36159c16417e96ac5
-41891b231e20a1d32b1d7449e7863470eb38ca0a
\ No newline at end of file
+68684495f1a62a41ad27934f3a6d3bc9d290a57d
\ No newline at end of file
do_catchsql_test 3.5 { PRAGMA wal_checkpoint } {0 {1 -1 -1}}
do_test 3.6 { unlock } {}
-do_execsql_test 4.1 { PRAGMA wal_checkpoint } {0 2 2}
+# At this point the WAL file consists of a single frame only - written
+# by test case 3.1. If the ZERO_DAMAGE flag were not set, it would consist
+# of two frames - the frame written by 3.1 and a padding frame.
+do_execsql_test 4.1 { PRAGMA wal_checkpoint } {0 1 1}
do_test 4.2 { sqlite3demo_superlock unlock test.db } {unlock}
do_catchsql_test 4.3 { SELECT * FROM t1 } {1 {database is locked}}
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 {
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}
} [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
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 }
}
}
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
INSERT INTO data VALUES('need xShmOpen to see this');
PRAGMA wal_checkpoint;
}
-} {wal 0 5 5}
+ # Three pages in the WAL file at this point: One copy of page 1 and two
+ # of the root page for table "data".
+} {wal 0 3 3}
do_test wal2-4.2 {
db close
testvfs tvfs -noshm 1
INSERT INTO t2 VALUES('I', 'II');
PRAGMA journal_mode;
}
-} {wal exclusive 0 3 3 wal}
+} {wal exclusive 0 2 2 wal}
do_test wal2-6.5.2 {
execsql {
PRAGMA locking_mode = normal;
} {normal exclusive I II III IV}
do_test wal2-6.5.3 {
execsql { PRAGMA wal_checkpoint }
-} {0 4 4}
+} {0 2 2}
db close
proc lock_control {method filename handle spec} {
execsql {PRAGMA auto_vacuum = 0}
execsql $sql
+ do_execsql_test wal2-14.$tn.0 { PRAGMA page_size = 4096 } {}
do_execsql_test wal2-14.$tn.1 { PRAGMA journal_mode = WAL } {wal}
set sqlite_sync_count 0
INSERT INTO t1 VALUES(5, 6);
COMMIT; -- 2 wal sync
PRAGMA wal_checkpoint; -- 1 wal sync, 1 db sync
- } {10 0 5 5 0 2 2}
+ } {10 0 3 3 0 1 1}
do_test wal2-14.$tn.3 {
cond_incr_sync_count 1
sqlite3 db test.db
do_execsql_test 15.$tn.1 "
+ PRAGMA page_size = 4096;
CREATE TABLE t1(x);
PRAGMA wal_autocheckpoint = OFF;
PRAGMA journal_mode = WAL;
PRAGMA synchronous = [lindex $settings 2];
" {0 wal}
+if { $tn==2} breakpoint
do_test 15.$tn.2 {
set sync(normal) 0
set sync(full) 0
1 off
{}
2 normal
- {test.db-wal normal test.db normal}
+ {test.db-wal normal test.db-wal normal test.db normal}
3 full
- {test.db-wal normal test.db-wal normal test.db-wal normal test.db normal}
+ {test.db-wal normal test.db-wal normal test.db-wal normal test.db-wal normal test.db normal}
} {
proc sync_counter {args} {
} {o t t f}
do_test wal3-6.1.3 {
execsql { PRAGMA wal_checkpoint } db2
-} {0 7 7}
+} {0 4 4}
# At this point the log file has been fully checkpointed. However,
# connection [db3] holds a lock that prevents the log from being wrapped.
}
do_test wal3-6.2.2 {
execsql { PRAGMA wal_checkpoint }
-} {0 7 7}
+} {0 4 4}
do_test wal3-6.2.3 {
set ::R
} {h h l b}
INSERT INTO b VALUES('Markazi');
PRAGMA wal_checkpoint;
}
-} {wal 0 9 9}
+} {wal 0 5 5}
do_test wal3-8.2 {
execsql { SELECT * FROM b }
} {Tehran Qom Markazi}
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 {
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 {
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
# 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} -
-
- 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
-
- 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
+ 1 PASSIVE - {0 3 3} -
+ 2 TYPO - {0 3 3} -
+
+ 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 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 {