Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Side by Side Diff: third_party/sqlite/src/test/walcrash.test

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/sqlite/src/test/walcksum.test ('k') | third_party/sqlite/src/test/walcrash4.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/walcksum.test ('k') | third_party/sqlite/src/test/walcrash4.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698