OLD | NEW |
1 # 2010 February 8 | 1 # 2010 February 8 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 INSERT INTO t1 SELECT randomblob(900) FROM t1 LIMIT 4; /* 16 */ | 230 INSERT INTO t1 SELECT randomblob(900) FROM t1 LIMIT 4; /* 16 */ |
231 INSERT INTO t1 SELECT randomblob(900) FROM t1 LIMIT 4; /* 20 */ | 231 INSERT INTO t1 SELECT randomblob(900) FROM t1 LIMIT 4; /* 20 */ |
232 INSERT INTO t1 SELECT randomblob(900) FROM t1 LIMIT 4; /* 24 */ | 232 INSERT INTO t1 SELECT randomblob(900) FROM t1 LIMIT 4; /* 24 */ |
233 INSERT INTO t1 SELECT randomblob(900) FROM t1 LIMIT 4; /* 28 */ | 233 INSERT INTO t1 SELECT randomblob(900) FROM t1 LIMIT 4; /* 28 */ |
234 INSERT INTO t1 SELECT randomblob(900) FROM t1 LIMIT 4; /* 32 */ | 234 INSERT INTO t1 SELECT randomblob(900) FROM t1 LIMIT 4; /* 32 */ |
235 | 235 |
236 PRAGMA wal_checkpoint; | 236 PRAGMA wal_checkpoint; |
237 INSERT INTO t1 VALUES(randomblob(9000)); | 237 INSERT INTO t1 VALUES(randomblob(9000)); |
238 INSERT INTO t1 VALUES(randomblob(9000)); | 238 INSERT INTO t1 VALUES(randomblob(9000)); |
239 INSERT INTO t1 VALUES(randomblob(9000)); | 239 INSERT INTO t1 VALUES(randomblob(9000)); |
| 240 INSERT INTO t1 VALUES(randomblob(9000)); |
240 } | 241 } |
241 } {1 {child process exited abnormally}} | 242 } {1 {child process exited abnormally}} |
242 | 243 |
243 do_test walcrash-6.$i.2 { | 244 do_test walcrash-6.$i.2 { |
244 sqlite3 db test.db | 245 sqlite3 db test.db |
245 execsql { SELECT count(*)==34 OR count(*)==35 FROM t1 WHERE x != 1 } | 246 execsql { SELECT count(*) BETWEEN 34 AND 36 FROM t1 WHERE x != 1 } |
246 } {1} | 247 } {1} |
247 do_test walcrash-6.$i.3 { execsql { PRAGMA main.integrity_check } } {ok} | 248 do_test walcrash-6.$i.3 { execsql { PRAGMA main.integrity_check } } {ok} |
248 do_test walcrash-6.$i.4 { execsql { PRAGMA main.journal_mode } } {wal} | 249 do_test walcrash-6.$i.4 { execsql { PRAGMA main.journal_mode } } {wal} |
249 | 250 |
250 db close | 251 db close |
251 } | 252 } |
252 | 253 |
253 #------------------------------------------------------------------------- | 254 #------------------------------------------------------------------------- |
254 # This test case simulates a crash while checkpointing the database. Page | 255 # This test case simulates a crash while checkpointing the database. Page |
255 # 1 is one of the pages overwritten by the checkpoint. This is a special | 256 # 1 is one of the pages overwritten by the checkpoint. This is a special |
(...skipping 30 matching lines...) Expand all Loading... |
286 sqlite3 db test.db | 287 sqlite3 db test.db |
287 execsql { SELECT b FROM t1 WHERE a = 1 } | 288 execsql { SELECT b FROM t1 WHERE a = 1 } |
288 } {2} | 289 } {2} |
289 do_test walcrash-7.$i.3 { execsql { PRAGMA main.integrity_check } } {ok} | 290 do_test walcrash-7.$i.3 { execsql { PRAGMA main.integrity_check } } {ok} |
290 do_test walcrash-7.$i.4 { execsql { PRAGMA main.journal_mode } } {wal} | 291 do_test walcrash-7.$i.4 { execsql { PRAGMA main.journal_mode } } {wal} |
291 | 292 |
292 db close | 293 db close |
293 } | 294 } |
294 | 295 |
295 finish_test | 296 finish_test |
OLD | NEW |