OLD | NEW |
1 # 2011 April 25 | 1 # 2011 April 25 |
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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 SAVEPOINT abc; | 204 SAVEPOINT abc; |
205 INSERT INTO t01 VALUES('a b c'); | 205 INSERT INTO t01 VALUES('a b c'); |
206 ROLLBACK TO abc; | 206 ROLLBACK TO abc; |
207 COMMIT; | 207 COMMIT; |
208 } | 208 } |
209 do_execsql_test 4.2.2 { | 209 do_execsql_test 4.2.2 { |
210 SELECT * FROM t01 WHERE t01 MATCH 'b'; | 210 SELECT * FROM t01 WHERE t01 MATCH 'b'; |
211 INSERT INTO t01(t01) VALUES('integrity-check'); | 211 INSERT INTO t01(t01) VALUES('integrity-check'); |
212 } {} | 212 } {} |
213 | 213 |
| 214 do_execsql_test 4.3.1 { |
| 215 CREATE VIRTUAL TABLE t02 USING fts4; |
| 216 INSERT INTO t01 VALUES('1 1 1'); |
| 217 INSERT INTO t02 VALUES('2 2 2'); |
| 218 BEGIN; |
| 219 SAVEPOINT abc; |
| 220 INSERT INTO t01 VALUES('a b c'); |
| 221 INSERT INTO t02 VALUES('a b c'); |
| 222 ROLLBACK TO abc; |
| 223 COMMIT; |
| 224 } |
| 225 do_execsql_test 4.3.2 { |
| 226 SELECT * FROM t01 WHERE t01 MATCH 'b'; |
| 227 INSERT INTO t01(t01) VALUES('integrity-check'); |
| 228 } {} |
| 229 |
| 230 do_execsql_test 4.4.1 { |
| 231 CREATE TABLE A(ID INTEGER PRIMARY KEY, AnotherID INTEGER, Notes TEXT); |
| 232 CREATE VIRTUAL TABLE AFTS USING FTS4 (Notes); |
| 233 CREATE TRIGGER A_DeleteTrigger AFTER DELETE ON A FOR EACH ROW BEGIN |
| 234 DELETE FROM AFTS WHERE rowid=OLD.ID; |
| 235 END; |
| 236 CREATE TABLE B(ID INTEGER PRIMARY KEY,Notes TEXT); |
| 237 CREATE VIRTUAL TABLE BFTS USING FTS3 (Notes); |
| 238 CREATE TRIGGER B_DeleteTrigger AFTER DELETE ON B FOR EACH ROW BEGIN |
| 239 DELETE FROM BFTS WHERE rowid=OLD.ID; |
| 240 END; |
| 241 } |
| 242 |
| 243 do_execsql_test 4.4.2 { |
| 244 BEGIN TRANSACTION; |
| 245 DELETE FROM A WHERE AnotherID=1; |
| 246 DELETE FROM B WHERE ID=1; |
| 247 COMMIT; |
| 248 } |
| 249 |
| 250 |
| 251 |
214 finish_test | 252 finish_test |
215 | |
OLD | NEW |