| OLD | NEW |
| 1 # 2010 July 1 | 1 # 2010 July 1 |
| 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 13 matching lines...) Expand all Loading... |
| 24 INSERT INTO t1 VALUES(1); | 24 INSERT INTO t1 VALUES(1); |
| 25 INSERT INTO t1 VALUES(2); | 25 INSERT INTO t1 VALUES(2); |
| 26 SELECT x FROM t1 ORDER BY x; | 26 SELECT x FROM t1 ORDER BY x; |
| 27 } | 27 } |
| 28 } {wal 1 2} | 28 } {wal 1 2} |
| 29 | 29 |
| 30 do_test wal4-1.2 { | 30 do_test wal4-1.2 { |
| 31 # Save a copy of the file-system containing the wal and wal-index files | 31 # Save a copy of the file-system containing the wal and wal-index files |
| 32 # only (no database file). | 32 # only (no database file). |
| 33 faultsim_save_and_close | 33 faultsim_save_and_close |
| 34 file delete -force sv_test.db | 34 forcedelete sv_test.db |
| 35 } {} | 35 } {} |
| 36 | 36 |
| 37 do_test wal4-1.3 { | 37 do_test wal4-1.3 { |
| 38 faultsim_restore_and_reopen | 38 faultsim_restore_and_reopen |
| 39 catchsql { SELECT * FROM t1 } | 39 catchsql { SELECT * FROM t1 } |
| 40 } {1 {no such table: t1}} | 40 } {1 {no such table: t1}} |
| 41 | 41 |
| 42 do_faultsim_test wal4-2 -prep { | 42 do_faultsim_test wal4-2 -prep { |
| 43 faultsim_restore_and_reopen | 43 faultsim_restore_and_reopen |
| 44 } -body { | 44 } -body { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 55 # | 55 # |
| 56 if { $testrc==0 && [file exists test.db-wal] } { | 56 if { $testrc==0 && [file exists test.db-wal] } { |
| 57 error "Wal file was not deleted" | 57 error "Wal file was not deleted" |
| 58 } | 58 } |
| 59 if { [file size test.db]!=0 } { | 59 if { [file size test.db]!=0 } { |
| 60 error "Db file grew to [file size test.db] bytes" | 60 error "Db file grew to [file size test.db] bytes" |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 | 63 |
| 64 finish_test | 64 finish_test |
| OLD | NEW |