Adjust some test cases in triggerC.test to handle non-default SQLITE_MAX_TRIGGER_DEPTH settings.
FossilOrigin-Name: 9d6c6129fd8be42c164f14bb90011b252c1f2c46
This commit is contained in:
parent
b76ee876ba
commit
35913a49db
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Adjust\stest\scase\sin\squota.test\sto\shandle\sWindows\sdir\sseperators.
|
||||
D 2011-04-15T21:37:33.430
|
||||
C Adjust\ssome\stest\scases\sin\striggerC.test\sto\shandle\snon-default\sSQLITE_MAX_TRIGGER_DEPTH\ssettings.
|
||||
D 2011-04-17T00:55:13.458
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 7a4d9524721d40ef9ee26f93f9bd6a51dba106f2
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -827,7 +827,7 @@ F test/trigger8.test 30cb0530bd7c4728055420e3f739aa00412eafa4
|
||||
F test/trigger9.test 5b0789f1c5c4600961f8e68511b825b87be53e31
|
||||
F test/triggerA.test eaf11a29db2a11967d2d4b49d37f92bce598194e
|
||||
F test/triggerB.test 56780c031b454abac2340dbb3b71ac5c56c3d7fe
|
||||
F test/triggerC.test 8a691ff6dd47df2e57395bbec4b62101fac0f363
|
||||
F test/triggerC.test 811ab569af9e6fc894afbcc0d77d14500b2406c5
|
||||
F test/triggerD.test c6add3817351451e419f6ff9e9a259b02b6e2de7
|
||||
F test/tt3_checkpoint.c 415eccce672d681b297485fc20f44cdf0eac93af
|
||||
F test/types.test bf816ce73c7dfcfe26b700c19f97ef4050d194ff
|
||||
@ -929,7 +929,7 @@ F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
P 8f99c5bf639ee4f6384cc3c2d7f056d1b08e4f16
|
||||
R 07905b1b5fa92907f27105413bb72c70
|
||||
P 75ed1bcee85587ddd54269156aa53df5f456a6c4
|
||||
R 379c921b24ffb143c95ccc4a63246270
|
||||
U shaneh
|
||||
Z d2fec6e0a0cf675094cc1379ebad5d7b
|
||||
Z 2e9dcf2f8c6a1f5638334b5ebd3e741d
|
||||
|
@ -1 +1 @@
|
||||
75ed1bcee85587ddd54269156aa53df5f456a6c4
|
||||
9d6c6129fd8be42c164f14bb90011b252c1f2c46
|
@ -246,7 +246,7 @@ do_test triggerC-2.2 {
|
||||
} {100}
|
||||
|
||||
do_test triggerC-2.3 {
|
||||
execsql {
|
||||
execsql "
|
||||
CREATE TABLE t23(x PRIMARY KEY);
|
||||
|
||||
CREATE TRIGGER t23a AFTER INSERT ON t23 BEGIN
|
||||
@ -254,15 +254,15 @@ do_test triggerC-2.3 {
|
||||
END;
|
||||
|
||||
CREATE TRIGGER t23b BEFORE INSERT ON t23 BEGIN
|
||||
SELECT CASE WHEN new.x>500
|
||||
SELECT CASE WHEN new.x>[expr $SQLITE_MAX_TRIGGER_DEPTH / 2]
|
||||
THEN RAISE(IGNORE)
|
||||
ELSE NULL END;
|
||||
END;
|
||||
|
||||
INSERT INTO t23 VALUES(1);
|
||||
SELECT count(*) FROM t23;
|
||||
}
|
||||
} {500}
|
||||
"
|
||||
} [list [expr $SQLITE_MAX_TRIGGER_DEPTH / 2]]
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
@ -288,12 +288,12 @@ do_test triggerC-3.1.3 {
|
||||
} {}
|
||||
|
||||
do_test triggerC-3.2.1 {
|
||||
execsql {
|
||||
execsql "
|
||||
CREATE TABLE t3b(x);
|
||||
CREATE TRIGGER t3bi AFTER INSERT ON t3b WHEN new.x<2000 BEGIN
|
||||
CREATE TRIGGER t3bi AFTER INSERT ON t3b WHEN new.x<[expr $SQLITE_MAX_TRIGGER_DEPTH * 2] BEGIN
|
||||
INSERT INTO t3b VALUES(new.x+1);
|
||||
END;
|
||||
}
|
||||
"
|
||||
catchsql {
|
||||
INSERT INTO t3b VALUES(1);
|
||||
}
|
||||
@ -303,39 +303,39 @@ do_test triggerC-3.2.2 {
|
||||
} {}
|
||||
|
||||
do_test triggerC-3.3.1 {
|
||||
catchsql {
|
||||
INSERT INTO t3b VALUES(1001);
|
||||
}
|
||||
catchsql "
|
||||
INSERT INTO t3b VALUES([expr $SQLITE_MAX_TRIGGER_DEPTH + 1]);
|
||||
"
|
||||
} {0 {}}
|
||||
do_test triggerC-3.3.2 {
|
||||
db eval {SELECT count(*), max(x), min(x) FROM t3b}
|
||||
} {1000 2000 1001}
|
||||
} [list $SQLITE_MAX_TRIGGER_DEPTH [expr $SQLITE_MAX_TRIGGER_DEPTH * 2] [expr $SQLITE_MAX_TRIGGER_DEPTH + 1]]
|
||||
|
||||
do_test triggerC-3.4.1 {
|
||||
catchsql {
|
||||
catchsql "
|
||||
DELETE FROM t3b;
|
||||
INSERT INTO t3b VALUES(999);
|
||||
}
|
||||
INSERT INTO t3b VALUES([expr $SQLITE_MAX_TRIGGER_DEPTH - 1]);
|
||||
"
|
||||
} {1 {too many levels of trigger recursion}}
|
||||
do_test triggerC-3.4.2 {
|
||||
db eval {SELECT count(*), max(x), min(x) FROM t3b}
|
||||
} {0 {} {}}
|
||||
|
||||
do_test triggerC-3.5.1 {
|
||||
sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 100
|
||||
catchsql {
|
||||
INSERT INTO t3b VALUES(1901);
|
||||
}
|
||||
sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH [expr $SQLITE_MAX_TRIGGER_DEPTH / 10]
|
||||
catchsql "
|
||||
INSERT INTO t3b VALUES([expr ($SQLITE_MAX_TRIGGER_DEPTH * 2) - ($SQLITE_MAX_TRIGGER_DEPTH / 10) + 1]);
|
||||
"
|
||||
} {0 {}}
|
||||
do_test triggerC-3.5.2 {
|
||||
db eval {SELECT count(*), max(x), min(x) FROM t3b}
|
||||
} {100 2000 1901}
|
||||
} [list [expr $SQLITE_MAX_TRIGGER_DEPTH / 10] [expr $SQLITE_MAX_TRIGGER_DEPTH * 2] [expr ($SQLITE_MAX_TRIGGER_DEPTH * 2) - ($SQLITE_MAX_TRIGGER_DEPTH / 10) + 1]]
|
||||
|
||||
do_test triggerC-3.5.3 {
|
||||
catchsql {
|
||||
catchsql "
|
||||
DELETE FROM t3b;
|
||||
INSERT INTO t3b VALUES(1900);
|
||||
}
|
||||
INSERT INTO t3b VALUES([expr ($SQLITE_MAX_TRIGGER_DEPTH * 2) - ($SQLITE_MAX_TRIGGER_DEPTH / 10)]);
|
||||
"
|
||||
} {1 {too many levels of trigger recursion}}
|
||||
do_test triggerC-3.5.4 {
|
||||
db eval {SELECT count(*), max(x), min(x) FROM t3b}
|
||||
@ -343,25 +343,25 @@ do_test triggerC-3.5.4 {
|
||||
|
||||
do_test triggerC-3.6.1 {
|
||||
sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 1
|
||||
catchsql {
|
||||
INSERT INTO t3b VALUES(2000);
|
||||
}
|
||||
catchsql "
|
||||
INSERT INTO t3b VALUES([expr $SQLITE_MAX_TRIGGER_DEPTH * 2]);
|
||||
"
|
||||
} {0 {}}
|
||||
do_test triggerC-3.6.2 {
|
||||
db eval {SELECT count(*), max(x), min(x) FROM t3b}
|
||||
} {1 2000 2000}
|
||||
} [list 1 [expr $SQLITE_MAX_TRIGGER_DEPTH * 2] [expr $SQLITE_MAX_TRIGGER_DEPTH * 2]]
|
||||
|
||||
do_test triggerC-3.6.3 {
|
||||
catchsql {
|
||||
catchsql "
|
||||
DELETE FROM t3b;
|
||||
INSERT INTO t3b VALUES(1999);
|
||||
}
|
||||
INSERT INTO t3b VALUES([expr ($SQLITE_MAX_TRIGGER_DEPTH * 2) - 1]);
|
||||
"
|
||||
} {1 {too many levels of trigger recursion}}
|
||||
do_test triggerC-3.6.4 {
|
||||
db eval {SELECT count(*), max(x), min(x) FROM t3b}
|
||||
} {0 {} {}}
|
||||
sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH 1000
|
||||
|
||||
sqlite3_limit db SQLITE_LIMIT_TRIGGER_DEPTH $SQLITE_MAX_TRIGGER_DEPTH
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# This next block of tests, triggerC-4.*, checks that affinity
|
||||
|
Loading…
Reference in New Issue
Block a user