OLD | NEW |
1 # 2010 September 28 | 1 # 2010 September 28 |
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 do_execsql_test schema4-2.6 { | 142 do_execsql_test schema4-2.6 { |
143 CREATE TEMP TRIGGER x1 AFTER UPDATE ON tbl BEGIN | 143 CREATE TEMP TRIGGER x1 AFTER UPDATE ON tbl BEGIN |
144 INSERT INTO log VALUES('after update', new.a, new.b); | 144 INSERT INTO log VALUES('after update', new.a, new.b); |
145 END; | 145 END; |
146 | 146 |
147 CREATE TEMP TABLE x1(x); | 147 CREATE TEMP TABLE x1(x); |
148 INSERT INTO x1 VALUES(123); | 148 INSERT INTO x1 VALUES(123); |
149 } {} | 149 } {} |
150 | 150 |
151 do_execsql_test schema4-2.8 { | 151 do_execsql_test schema4-2.8 { |
152 select sql from sqlite_temp_master WHERE type='table'; | 152 select sql from temp.sqlite_master WHERE type='table'; |
153 } {{CREATE TABLE x1(x)}} | 153 } {{CREATE TABLE x1(x)}} |
154 | 154 |
155 do_execsql_test schema4-2.7 { ALTER TABLE tbl RENAME TO tbl2 } {} | 155 do_execsql_test schema4-2.7 { ALTER TABLE tbl RENAME TO tbl2 } {} |
156 | 156 |
157 do_execsql_test schema4-2.9 { | 157 do_execsql_test schema4-2.9 { |
158 select sql from sqlite_temp_master WHERE type='table'; | 158 select sql from sqlite_temp_master WHERE type='table'; |
159 } {{CREATE TABLE x1(x)}} | 159 } {{CREATE TABLE x1(x)}} |
160 | 160 |
161 do_execsql_test schema4-2.10 { | 161 do_execsql_test schema4-2.10 { |
162 DELETE FROM log; | 162 DELETE FROM log; |
163 INSERT INTO tbl2 VALUES('e', 'f'); | 163 INSERT INTO tbl2 VALUES('e', 'f'); |
164 UPDATE tbl2 SET a='g', b='h'; | 164 UPDATE tbl2 SET a='g', b='h'; |
165 DELETE FROM tbl2; | 165 DELETE FROM tbl2; |
166 SELECT * FROM log; | 166 SELECT * FROM log; |
167 } {{after insert} e f {after update} g h {after delete} g h} | 167 } {{after insert} e f {after update} g h {after delete} g h} |
168 | 168 |
169 do_execsql_test schema4-2.11 { | 169 do_execsql_test schema4-2.11 { |
170 INSERT INTO x1 VALUES(456); | 170 INSERT INTO x1 VALUES(456); |
171 SELECT * FROM x1 | 171 SELECT * FROM x1 |
172 } {123 456} | 172 } {123 456} |
173 } | 173 } |
174 | 174 |
175 finish_test | 175 finish_test |
OLD | NEW |