| OLD | NEW |
| 1 # 2007 April 16 | 1 # 2007 April 16 |
| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 register_echo_module [sqlite3_connection_pointer db] | 137 register_echo_module [sqlite3_connection_pointer db] |
| 138 execsql { | 138 execsql { |
| 139 SELECT * FROM t1 UNION ALL | 139 SELECT * FROM t1 UNION ALL |
| 140 SELECT * FROM t2 UNION ALL | 140 SELECT * FROM t2 UNION ALL |
| 141 SELECT * FROM t3 | 141 SELECT * FROM t3 |
| 142 } db | 142 } db |
| 143 } {1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6} | 143 } {1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6} |
| 144 | 144 |
| 145 # Try a rename or two. | 145 # Try a rename or two. |
| 146 # | 146 # |
| 147 do_test vtab_shared-1.13.1 { | 147 ifcapable altertable { |
| 148 execsql { ALTER TABLE t1 RENAME TO t4 } | 148 do_test vtab_shared-1.13.1 { |
| 149 execsql { SELECT * FROM t4 } db | 149 execsql { ALTER TABLE t1 RENAME TO t4 } |
| 150 } {1 2 3 4 5 6} | 150 execsql { SELECT * FROM t4 } db |
| 151 do_test vtab_shared-1.13.2 { | 151 } {1 2 3 4 5 6} |
| 152 execsql { SELECT * FROM t4 } db2 | 152 do_test vtab_shared-1.13.2 { |
| 153 } {1 2 3 4 5 6} | 153 execsql { SELECT * FROM t4 } db2 |
| 154 do_test vtab_shared-1.13.3 { | 154 } {1 2 3 4 5 6} |
| 155 execsql { ALTER TABLE t2 RENAME TO t5 } | 155 do_test vtab_shared-1.13.3 { |
| 156 execsql { SELECT * FROM t4 } db2 | 156 execsql { ALTER TABLE t2 RENAME TO t5 } |
| 157 } {1 2 3 4 5 6} | 157 execsql { SELECT * FROM t4 } db2 |
| 158 } {1 2 3 4 5 6} |
| 159 } |
| 158 | 160 |
| 159 # Try an UPDATE/INSERT/DELETE on a shared vtab as the first statement after a | 161 # Try an UPDATE/INSERT/DELETE on a shared vtab as the first statement after a |
| 160 # schema is loaded. | 162 # schema is loaded. |
| 161 do_test vtab_shared_1.14.1 { | 163 do_test vtab_shared_1.14.1 { |
| 162 db2 close | 164 db2 close |
| 163 sqlite3 db2 test.db | 165 sqlite3 db2 test.db |
| 164 register_echo_module [sqlite3_connection_pointer db2] | 166 register_echo_module [sqlite3_connection_pointer db2] |
| 165 execsql { SELECT * FROM t3 } | 167 execsql { SELECT * FROM t3 } |
| 166 } {1 2 3 4 5 6} | 168 } {1 2 3 4 5 6} |
| 167 do_test vtab_shared_1.14.2 { | 169 do_test vtab_shared_1.14.2 { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 execsql { | 222 execsql { |
| 221 INSERT INTO t3 VALUES(4, 5, 6); | 223 INSERT INTO t3 VALUES(4, 5, 6); |
| 222 SELECT * FROM t3; | 224 SELECT * FROM t3; |
| 223 } | 225 } |
| 224 } {1 2 3 4 5 6} | 226 } {1 2 3 4 5 6} |
| 225 | 227 |
| 226 db close | 228 db close |
| 227 db2 close | 229 db2 close |
| 228 sqlite3_enable_shared_cache 0 | 230 sqlite3_enable_shared_cache 0 |
| 229 finish_test | 231 finish_test |
| OLD | NEW |