-C When\scommitting\sa\sWAL\stransaction,\smake\ssure\sat\sleast\sone\spage\sis\nwritten\sto\sthe\sWAL\sfile\sso\sthat\sthe\sWAL\ssubsystem\swill\shave\sa\spage\non\swhich\sto\sset\sthe\scommit\sflag.\nTicket\s[2d1a5c67dfc236].
-D 2011-05-19T01:21:42.431
+C Add\sanother\stest\sfor\s[2d1a5c67df].
+D 2011-05-19T07:53:23.122
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 11dcc00a8d0e5202def00e81732784fb0cc4fe1d
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F test/threadtest3.c 0ed13e09690f6204d7455fac3b0e8ece490f6eef
F test/tkt-02a8e81d44.test 58494de77be2cf249228ada3f313fa399821c6ab
F test/tkt-26ff0c2d1e.test 888324e751512972c6e0d1a09df740d8f5aaf660
-F test/tkt-2d1a5c67d.test 39d2368072315923021700a216379fcf23ac3a5c
+F test/tkt-2d1a5c67d.test 450b3cf86ca9a3b1fd0a9e136978142be3bff7e0
F test/tkt-2ea2425d34.test 1cf13e6f75d149b3209a0cb32927a82d3d79fb28
F test/tkt-31338dca7e.test 5741cd48de500347a437ba1be58c8335e83c5a5e
F test/tkt-313723c356.test c47f8a9330523e6f35698bf4489bcb29609b53ac
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P de58cb28387f44c35b1a81bdab853cafd938c1a6
-R e623b89a5e0b9474dd0884ecf24382fc
-U drh
-Z 83669a82fd950b01af57955dbca1c918
+P 67bf1c9a888b0d84d252d6c4c754c2c51994d208
+R 84c84662daf4fcfa430ab94eb0e5302f
+U dan
+Z b2a115bcb644bb929ad33751c5f52805
-67bf1c9a888b0d84d252d6c4c754c2c51994d208
\ No newline at end of file
+97fcd9e88891abd44037004e47862bcecfa1b0c9
\ No newline at end of file
set testdir [file dirname $argv0]
source $testdir/tester.tcl
+set testprefix tkt-2d1a5c67d
ifcapable !wal {finish_test; return}
} {1000000 1 2}
}
+db close
+sqlite3 db test.db
+
+
+do_execsql_test 3.1 {
+ PRAGMA cache_size = 10;
+ CREATE TABLE t3(a INTEGER PRIMARY KEY, b);
+ CREATE TABLE t4(a);
+}
+
+do_execsql_test 3.2 {
+ INSERT INTO t3 VALUES(NULL, randomblob(500));
+ INSERT INTO t3 SELECT NULL, b||b FROM t3; -- 2
+ INSERT INTO t3 SELECT NULL, b||b FROM t3; -- 4
+ INSERT INTO t3 SELECT NULL, b||b FROM t3; -- 8
+ INSERT INTO t3 SELECT NULL, b||b FROM t3; -- 16
+ INSERT INTO t3 SELECT NULL, b||b FROM t3; -- 32
+ INSERT INTO t3 SELECT NULL, b||b FROM t3; -- 64
+ INSERT INTO t3 SELECT NULL, b||b FROM t3; -- 128
+}
+
+do_execsql_test 3.3 {
+ BEGIN;
+ INSERT INTO t4 VALUES('xyz');
+}
+
+do_test 3.4 {
+ set blobs [list]
+ for {set i 1} {$i<100} {incr i} {
+ set b [db incrblob -readonly t3 b $i]
+ read $b
+ lappend blobs $b
+ }
+
+ execsql COMMIT
+ execsql { SELECT * FROM t4 WHERE a = 'xyz' }
+} {xyz}
+
+do_test 3.5 {
+ foreach b $blobs { close $b }
+ execsql { SELECT * FROM t4 WHERE a = 'xyz' }
+} {xyz}
+
+# Check that recovery works on the WAL file.
+#
+forcedelete test.db2-wal test.db2
+do_test 3.6 {
+ file copy test.db-wal test.db2-wal
+ file copy test.db test.db2
+ sqlite3 db2 test.db2
+ execsql { SELECT * FROM t4 WHERE a = 'xyz' } db2
+} {xyz}
+
finish_test