OLD | NEW |
1 # The author disclaims copyright to this source code. In place of | 1 # The author disclaims copyright to this source code. In place of |
2 # a legal notice, here is a blessing: | 2 # a legal notice, here is a blessing: |
3 # | 3 # |
4 # May you do good and not evil. | 4 # May you do good and not evil. |
5 # May you find forgiveness for yourself and forgive others. | 5 # May you find forgiveness for yourself and forgive others. |
6 # May you share freely, never taking more than you give. | 6 # May you share freely, never taking more than you give. |
7 # | 7 # |
8 #*********************************************************************** | 8 #*********************************************************************** |
9 # | 9 # |
10 # This file tests creating and dropping triggers, and interaction thereof | 10 # This file tests creating and dropping triggers, and interaction thereof |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 } | 705 } |
706 } {1 {the NOT INDEXED clause is not allowed on UPDATE or DELETE statements withi
n triggers}} | 706 } {1 {the NOT INDEXED clause is not allowed on UPDATE or DELETE statements withi
n triggers}} |
707 do_test trigger1-16.7 { | 707 do_test trigger1-16.7 { |
708 catchsql { | 708 catchsql { |
709 CREATE TRIGGER main.t16err7 AFTER INSERT ON tA BEGIN | 709 CREATE TRIGGER main.t16err7 AFTER INSERT ON tA BEGIN |
710 DELETE FROM t16 INDEXED BY t16a WHERE a=123; | 710 DELETE FROM t16 INDEXED BY t16a WHERE a=123; |
711 END; | 711 END; |
712 } | 712 } |
713 } {1 {the INDEXED BY clause is not allowed on UPDATE or DELETE statements within
triggers}} | 713 } {1 {the INDEXED BY clause is not allowed on UPDATE or DELETE statements within
triggers}} |
714 | 714 |
| 715 #------------------------------------------------------------------------- |
| 716 # Test that bug [34cd55d68e0e6e7c] has been fixed. |
| 717 # |
| 718 do_execsql_test trigger1-17.0 { |
| 719 CREATE TABLE t17a(ii INT); |
| 720 CREATE TABLE t17b(tt TEXT PRIMARY KEY, ss); |
| 721 CREATE TRIGGER t17a_ai AFTER INSERT ON t17a BEGIN |
| 722 INSERT INTO t17b(tt) VALUES(new.ii); |
| 723 END; |
| 724 CREATE TRIGGER t17b_ai AFTER INSERT ON t17b BEGIN |
| 725 UPDATE t17b SET ss = 4; |
| 726 END; |
| 727 INSERT INTO t17a(ii) VALUES('1'); |
| 728 PRAGMA integrity_check; |
| 729 } {ok} |
| 730 |
715 finish_test | 731 finish_test |
OLD | NEW |