| OLD | NEW |
| 1 # 2004 June 30 | 1 # 2004 June 30 |
| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 do_test rollback-1.7 { | 72 do_test rollback-1.7 { |
| 73 sqlite3_step $STMT | 73 sqlite3_step $STMT |
| 74 } {SQLITE_ROW} | 74 } {SQLITE_ROW} |
| 75 do_test rollback-1.8 { | 75 do_test rollback-1.8 { |
| 76 sqlite3_step $STMT | 76 sqlite3_step $STMT |
| 77 } {SQLITE_ROW} | 77 } {SQLITE_ROW} |
| 78 do_test rollback-1.9 { | 78 do_test rollback-1.9 { |
| 79 sqlite3_finalize $STMT | 79 sqlite3_finalize $STMT |
| 80 } {SQLITE_OK} | 80 } {SQLITE_OK} |
| 81 | 81 |
| 82 set permutation "" | |
| 83 catch {set permutation $::permutations_test_prefix} | |
| 84 if {$tcl_platform(platform) == "unix" | 82 if {$tcl_platform(platform) == "unix" |
| 85 && $permutation ne "onefile" | 83 && [permutation] ne "onefile" |
| 86 && $permutation ne "inmemory_journal" | 84 && [permutation] ne "inmemory_journal" |
| 87 } { | 85 } { |
| 88 do_test rollback-2.1 { | 86 do_test rollback-2.1 { |
| 89 execsql { | 87 execsql { |
| 90 BEGIN; | 88 BEGIN; |
| 91 INSERT INTO t3 VALUES('hello world'); | 89 INSERT INTO t3 VALUES('hello world'); |
| 92 } | 90 } |
| 93 file copy -force test.db testA.db | 91 file copy -force test.db testA.db |
| 94 file copy -force test.db-journal testA.db-journal | 92 file copy -force test.db-journal testA.db-journal |
| 95 execsql { | 93 execsql { |
| 96 COMMIT; | 94 COMMIT; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 # the master-journal file and return SQLITE_CANTOPEN when it could not | 126 # the master-journal file and return SQLITE_CANTOPEN when it could not |
| 129 # be opened. This is incorrect, it should simply delete the journal | 127 # be opened. This is incorrect, it should simply delete the journal |
| 130 # file and proceed with the query. | 128 # file and proceed with the query. |
| 131 # | 129 # |
| 132 do_test rollback-2.2 { | 130 do_test rollback-2.2 { |
| 133 sqlite3 db2 testA.db | 131 sqlite3 db2 testA.db |
| 134 execsql { | 132 execsql { |
| 135 SELECT distinct tbl_name FROM sqlite_master; | 133 SELECT distinct tbl_name FROM sqlite_master; |
| 136 } db2 | 134 } db2 |
| 137 } {t1 t3} | 135 } {t1 t3} |
| 138 if {[lsearch {exclusive persistent_journal no_journal} $permutation]<0} { | 136 if {[lsearch {exclusive persistent_journal no_journal} [permutation]]<0} { |
| 139 do_test rollback-2.3 { | 137 do_test rollback-2.3 { |
| 140 file exists testA.db-journal | 138 file exists testA.db-journal |
| 141 } 0 | 139 } 0 |
| 142 } | 140 } |
| 143 do_test rollback-2.4 { | 141 do_test rollback-2.4 { |
| 144 execsql { | 142 execsql { |
| 145 SELECT distinct tbl_name FROM sqlite_master; | 143 SELECT distinct tbl_name FROM sqlite_master; |
| 146 } db2 | 144 } db2 |
| 147 } {t1 t3} | 145 } {t1 t3} |
| 148 | 146 |
| 149 db2 close | 147 db2 close |
| 150 } | 148 } |
| 151 | 149 |
| 152 finish_test | 150 finish_test |
| OLD | NEW |