| OLD | NEW |
| 1 # 2004 Feb 8 | 1 # 2004 Feb 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } | 121 } |
| 122 } {t2} | 122 } {t2} |
| 123 do_test interrupt-3.$i.2 { | 123 do_test interrupt-3.$i.2 { |
| 124 set ::sqlite_interrupt_count $::i | 124 set ::sqlite_interrupt_count $::i |
| 125 catchsql { | 125 catchsql { |
| 126 INSERT INTO t2 SELECT * FROM t1; | 126 INSERT INTO t2 SELECT * FROM t1; |
| 127 } | 127 } |
| 128 } {1 interrupted} | 128 } {1 interrupted} |
| 129 do_test interrupt-3.$i.3 { | 129 do_test interrupt-3.$i.3 { |
| 130 execsql { | 130 execsql { |
| 131 SELECT name FROM sqlite_temp_master; | 131 SELECT name FROM temp.sqlite_master; |
| 132 } | 132 } |
| 133 } {} | 133 } {} |
| 134 do_test interrupt-3.$i.4 { | 134 do_test interrupt-3.$i.4 { |
| 135 catchsql { | 135 catchsql { |
| 136 ROLLBACK | 136 ROLLBACK |
| 137 } | 137 } |
| 138 } {1 {cannot rollback - no transaction is active}} | 138 } {1 {cannot rollback - no transaction is active}} |
| 139 do_test interrupt-3.$i.5 { | 139 do_test interrupt-3.$i.5 { |
| 140 catchsql {SELECT name FROM sqlite_temp_master}; | 140 catchsql {SELECT name FROM sqlite_temp_master}; |
| 141 execsql { | 141 execsql { |
| 142 SELECT name FROM sqlite_temp_master; | 142 SELECT name FROM temp.sqlite_master; |
| 143 } | 143 } |
| 144 } {} | 144 } {} |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 | 147 |
| 148 # There are reports of a memory leak if an interrupt occurs during | 148 # There are reports of a memory leak if an interrupt occurs during |
| 149 # the beginning of a complex query - before the first callback. We | 149 # the beginning of a complex query - before the first callback. We |
| 150 # will try to reproduce it here: | 150 # will try to reproduce it here: |
| 151 # | 151 # |
| 152 execsql { | 152 execsql { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 176 sqlite3_interrupt db | 176 sqlite3_interrupt db |
| 177 return SQLITE_OK | 177 return SQLITE_OK |
| 178 } | 178 } |
| 179 db collation_needed fake_interrupt | 179 db collation_needed fake_interrupt |
| 180 catchsql { | 180 catchsql { |
| 181 CREATE INDEX fake ON fake1(a COLLATE fake_collation, b, c DESC); | 181 CREATE INDEX fake ON fake1(a COLLATE fake_collation, b, c DESC); |
| 182 } | 182 } |
| 183 } {1 interrupt} | 183 } {1 interrupt} |
| 184 } | 184 } |
| 185 finish_test | 185 finish_test |
| OLD | NEW |