OLD | NEW |
1 # 2009 February 27 | 1 # 2009 February 27 |
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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 CREATE TEMP TRIGGER tr1 BEFORE INSERT ON t1 BEGIN SELECT 1,2,3; END; | 229 CREATE TEMP TRIGGER tr1 BEFORE INSERT ON t1 BEGIN SELECT 1,2,3; END; |
230 } | 230 } |
231 | 231 |
232 do_test 5.1 { | 232 do_test 5.1 { |
233 sqlite3 db2 test.db | 233 sqlite3 db2 test.db |
234 execsql { DROP TABLE t1 } db2 | 234 execsql { DROP TABLE t1 } db2 |
235 } {} | 235 } {} |
236 | 236 |
237 do_execsql_test 5.2 { | 237 do_execsql_test 5.2 { |
238 SELECT * FROM sqlite_master; | 238 SELECT * FROM sqlite_master; |
239 SELECT * FROM sqlite_temp_master; | 239 SELECT * FROM temp.sqlite_master; |
240 } { | 240 } { |
241 trigger tr1 t1 0 | 241 trigger tr1 t1 0 |
242 {CREATE TRIGGER tr1 BEFORE INSERT ON t1 BEGIN SELECT 1,2,3; END} | 242 {CREATE TRIGGER tr1 BEFORE INSERT ON t1 BEGIN SELECT 1,2,3; END} |
243 } | 243 } |
244 db2 close | 244 db2 close |
245 | 245 |
246 #------------------------------------------------------------------------- | 246 #------------------------------------------------------------------------- |
247 # Check that if a second connection creates a table in an attached database | 247 # Check that if a second connection creates a table in an attached database |
248 # with the same name as a table in the main database that has a temp | 248 # with the same name as a table in the main database that has a temp |
249 # trigger attached to it nothing goes awry. | 249 # trigger attached to it nothing goes awry. |
(...skipping 20 matching lines...) Expand all Loading... |
270 } { | 270 } { |
271 table t1 t1 {CREATE TABLE t1(a, b, c)} | 271 table t1 t1 {CREATE TABLE t1(a, b, c)} |
272 } | 272 } |
273 | 273 |
274 do_catchsql_test 6.3 { | 274 do_catchsql_test 6.3 { |
275 INSERT INTO main.t1 VALUES(1); | 275 INSERT INTO main.t1 VALUES(1); |
276 } {1 error} | 276 } {1 error} |
277 db2 close | 277 db2 close |
278 | 278 |
279 finish_test | 279 finish_test |
OLD | NEW |