| OLD | NEW |
| 1 # 2009 January 8 | 1 # 2009 January 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 #*********************************************************************** |
| 11 # | 11 # |
| 12 # This test verifies a couple of specific potential data corruption | 12 # This test verifies a couple of specific potential data corruption |
| 13 # scenarios involving crashes or power failures. | 13 # scenarios involving crashes or power failures. |
| 14 # | 14 # |
| 15 # Later: Also, some other specific scenarios required for coverage | 15 # Later: Also, some other specific scenarios required for coverage |
| 16 # testing that do not lead to corruption. | 16 # testing that do not lead to corruption. |
| 17 # | 17 # |
| 18 # $Id: crash8.test,v 1.4 2009/01/11 00:44:48 drh Exp $ | 18 # $Id: crash8.test,v 1.4 2009/01/11 00:44:48 drh Exp $ |
| 19 | 19 |
| 20 | 20 |
| 21 set testdir [file dirname $argv0] | 21 set testdir [file dirname $argv0] |
| 22 source $testdir/tester.tcl | 22 source $testdir/tester.tcl |
| 23 | 23 |
| 24 ifcapable !crashtest { | 24 ifcapable !crashtest { |
| 25 finish_test | 25 finish_test |
| 26 return | 26 return |
| 27 } | 27 } |
| 28 do_not_use_codec |
| 28 | 29 |
| 29 do_test crash8-1.1 { | 30 do_test crash8-1.1 { |
| 30 execsql { | 31 execsql { |
| 31 PRAGMA auto_vacuum=OFF; | 32 PRAGMA auto_vacuum=OFF; |
| 32 CREATE TABLE t1(a, b); | 33 CREATE TABLE t1(a, b); |
| 33 CREATE INDEX i1 ON t1(a, b); | 34 CREATE INDEX i1 ON t1(a, b); |
| 34 INSERT INTO t1 VALUES(1, randstr(1000,1000)); | 35 INSERT INTO t1 VALUES(1, randstr(1000,1000)); |
| 35 INSERT INTO t1 VALUES(2, randstr(1000,1000)); | 36 INSERT INTO t1 VALUES(2, randstr(1000,1000)); |
| 36 INSERT INTO t1 VALUES(3, randstr(1000,1000)); | 37 INSERT INTO t1 VALUES(3, randstr(1000,1000)); |
| 37 INSERT INTO t1 VALUES(4, randstr(1000,1000)); | 38 INSERT INTO t1 VALUES(4, randstr(1000,1000)); |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 } | 400 } |
| 400 | 401 |
| 401 sqlite3 db2 testX.db | 402 sqlite3 db2 testX.db |
| 402 execsql { PRAGMA integrity_check } db2 | 403 execsql { PRAGMA integrity_check } db2 |
| 403 } {ok} | 404 } {ok} |
| 404 } | 405 } |
| 405 catch {db2 close} | 406 catch {db2 close} |
| 406 } | 407 } |
| 407 | 408 |
| 408 finish_test | 409 finish_test |
| OLD | NEW |