mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Fixes for new triggers scheme.
FossilOrigin-Name: 9eb91efda5241609ff18ff15ef5eaa0e86788eab
This commit is contained in:
@ -18,10 +18,14 @@ ifcapable {!trigger} {
|
||||
return
|
||||
}
|
||||
|
||||
# Test that we can cause ROLLBACK, FAIL and ABORT correctly
|
||||
# catchsql { DROP TABLE tbl; }
|
||||
catchsql { CREATE TABLE tbl (a, b, c) }
|
||||
# The tests in this file were written before SQLite supported recursive }
|
||||
# trigger invocation, and some tests depend on that to pass. So disable
|
||||
# recursive triggers for this file.
|
||||
catchsql { pragma disable_recursive_triggers = 1 }
|
||||
|
||||
# Test that we can cause ROLLBACK, FAIL and ABORT correctly
|
||||
#
|
||||
catchsql { CREATE TABLE tbl(a, b ,c) }
|
||||
execsql {
|
||||
CREATE TRIGGER before_tbl_insert BEFORE INSERT ON tbl BEGIN SELECT CASE
|
||||
WHEN (new.a = 4) THEN RAISE(IGNORE) END;
|
||||
@ -54,7 +58,7 @@ do_test trigger3-1.3 {
|
||||
# FAIL
|
||||
do_test trigger3-2.1 {
|
||||
catchsql {
|
||||
BEGIN;
|
||||
BEGIN;
|
||||
INSERT INTO tbl VALUES (5, 5, 6);
|
||||
INSERT INTO tbl VALUES (2, 5, 6);
|
||||
}
|
||||
|
Reference in New Issue
Block a user