-C After\sa\srollback\sthat\swrites\sor\struncates\sthe\sdatabase\sfile,\ssync\sthe\sdatabase\sfile\sbefore\sinvalidating\sthe\sjournal\scontents.
-D 2010-03-22T17:13:53
+C Add\san\sextra\stest\scase\sfor\scrash\srecovery.
+D 2010-03-22T17:38:11
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 4f2f967b7e58a35bb74fb7ec8ae90e0f4ca7868b
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F test/crash5.test 80a2f7073381837fc082435c97df52a830abcd80
F test/crash6.test 9c730cf06335003cb1f5cfceddacd044155336e0
F test/crash7.test e20a7b9ee1d16eaef7c94a4cb7ed2191b4d05970
-F test/crash8.test 167fbacd3e301c54c69930432134d9e4e86a1ac3
+F test/crash8.test a6742d8196ac426be4c547b27fd2e24236b66c82
F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2
F test/createtab.test 199cf68f44e5d9e87a0b8afc7130fdeb4def3272
F test/cse.test 277350a26264495e86b1785f34d2d0c8600e021c
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P ad68fa65bbd6b82e69fe8c36e4c459ea2ced0f8c
-R da2830191169e82dff44001b6ff66f57
+P b21b911f233842357af9ccc14525bbd48a38edb1
+R ffd53e378ecdea15b6b3ff7659ae3ab4
U dan
-Z 80e6e915ad885752ec643850a26719f6
+Z 60f0c36d7fc83afd295b943f92e6fd9c
} {jkl}
}
-catch { db close }
-file delete -force test.db test.db-journal
-sqlite3 db test.db
-
-do_test crash8-5.1 {
- execsql {
- CREATE TABLE t1(x PRIMARY KEY);
- INSERT INTO t1 VALUES(randomblob(900));
- INSERT INTO t1 SELECT randomblob(900) FROM t1;
- INSERT INTO t1 SELECT randomblob(900) FROM t1;
- INSERT INTO t1 SELECT randomblob(900) FROM t1;
- INSERT INTO t1 SELECT randomblob(900) FROM t1;
- INSERT INTO t1 SELECT randomblob(900) FROM t1;
- INSERT INTO t1 SELECT randomblob(900) FROM t1; /* 64 */
- }
- crashsql -file test.db -delay 1 {
- PRAGMA cache_size = 10;
- BEGIN;
- UPDATE t1 SET x = randomblob(900);
- ROLLBACK;
- INSERT INTO t1 VALUES(randomblob(900));
- }
- execsql { PRAGMA integrity_check }
-} {ok}
+for {set i 1} {$i < 10} {incr i} {
+ catch { db close }
+ file delete -force test.db test.db-journal
+ sqlite3 db test.db
+ do_test crash8-5.$i.1 {
+ execsql {
+ CREATE TABLE t1(x PRIMARY KEY);
+ INSERT INTO t1 VALUES(randomblob(900));
+ INSERT INTO t1 SELECT randomblob(900) FROM t1;
+ INSERT INTO t1 SELECT randomblob(900) FROM t1;
+ INSERT INTO t1 SELECT randomblob(900) FROM t1;
+ INSERT INTO t1 SELECT randomblob(900) FROM t1;
+ INSERT INTO t1 SELECT randomblob(900) FROM t1;
+ INSERT INTO t1 SELECT randomblob(900) FROM t1; /* 64 rows */
+ }
+ crashsql -file test.db -delay [expr ($::i%2) + 1] {
+ PRAGMA cache_size = 10;
+ BEGIN;
+ UPDATE t1 SET x = randomblob(900);
+ ROLLBACK;
+ INSERT INTO t1 VALUES(randomblob(900));
+ }
+ execsql { PRAGMA integrity_check }
+ } {ok}
+
+ catch { db close }
+ file delete -force test.db test.db-journal
+ sqlite3 db test.db
+ do_test crash8-5.$i.2 {
+ execsql {
+ PRAGMA cache_size = 10;
+ CREATE TABLE t1(x PRIMARY KEY);
+ INSERT INTO t1 VALUES(randomblob(900));
+ INSERT INTO t1 SELECT randomblob(900) FROM t1;
+ INSERT INTO t1 SELECT randomblob(900) FROM t1;
+ INSERT INTO t1 SELECT randomblob(900) FROM t1;
+ INSERT INTO t1 SELECT randomblob(900) FROM t1;
+ INSERT INTO t1 SELECT randomblob(900) FROM t1;
+ INSERT INTO t1 SELECT randomblob(900) FROM t1; /* 64 rows */
+ BEGIN;
+ UPDATE t1 SET x = randomblob(900);
+ }
+ file delete -force testX.db testX.db-journal
+ copy_file test.db testX.db
+ copy_file test.db-journal testX.db-journal
+ db close
+
+ crashsql -file test.db -delay [expr ($::i%2) + 1] {
+ SELECT * FROM sqlite_master;
+ INSERT INTO t1 VALUES(randomblob(900));
+ }
+ sqlite3 db2 testX.db
+ execsql { PRAGMA integrity_check } db2
+ } {ok}
+}
finish_test