Add some extra tests for the recent trigger compilation optimization. (CVS 4653)
FossilOrigin-Name: de54dad800f0b62740ad4ebb3780464b44eb6dff
This commit is contained in:
parent
d4e70ebd6f
commit
eb9ae90137
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Begin\ssetting\sa\sfoundation\son\swhich\sto\sconvert\sthe\sVM\sfrom\sa\sstack-based\nto\sa\sregister-based\smachine.\s\sEverything\sis\sstill\smostly\sstack\sbased\swith\nthis\scheck-in.\s\sThis\schange\smerely\sbegins\sadding\sinfrastructure\sto\ssupport\na\sregister-based\sarchitecture.\s(CVS\s4652)
|
||||
D 2008-01-02T00:34:37
|
||||
C Add\ssome\sextra\stests\sfor\sthe\srecent\strigger\scompilation\soptimization.\s(CVS\s4653)
|
||||
D 2008-01-02T04:41:25
|
||||
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
|
||||
F Makefile.in 30789bf70614bad659351660d76b8e533f3340e9
|
||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||
@ -493,7 +493,7 @@ F test/trigger5.test 619391a3e9fc194081d22cefd830d811e7badf83
|
||||
F test/trigger6.test 0e411654f122552da6590f0b4e6f781048a4a9b9
|
||||
F test/trigger7.test 0afa870be2ce1b132cdb85b17a4a4ef45aa8cece
|
||||
F test/trigger8.test 3a09275aa2214fdff56f731b1e775d8dfee4408a
|
||||
F test/trigger9.test 49c7cb761e9d3617ed868717b90b545e9bae8e73
|
||||
F test/trigger9.test b42703c378916d52a5e240ba98b25b155d3927a3
|
||||
F test/types.test 98e7a631bddf0806204358b452b02d0e319318a6
|
||||
F test/types2.test 3555aacf8ed8dc883356e59efc314707e6247a84
|
||||
F test/types3.test b730a7db03ef69f0fdb85b2addc20d1a0a04039b
|
||||
@ -603,7 +603,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
|
||||
P e08a33ed7255c22ce2805363f44a1d7770acb2dd
|
||||
R 31f346602d71de9f0cbdcecc99b8f06d
|
||||
U drh
|
||||
Z 1c9d96c8f34a418a83b5bab17073581f
|
||||
P 051ec01f2799e095516015f2ef0180e50fac387c
|
||||
R b1162a1e7d20a24c20501e40bc7dde0f
|
||||
U danielk1977
|
||||
Z 75dbf0acf2e3e5d3feebf07dfd171fca
|
||||
|
@ -1 +1 @@
|
||||
051ec01f2799e095516015f2ef0180e50fac387c
|
||||
de54dad800f0b62740ad4ebb3780464b44eb6dff
|
@ -49,7 +49,6 @@ do_test trigger9-1.1 {
|
||||
} {}
|
||||
|
||||
do_test trigger9-1.2.1 {
|
||||
sqlite3 db test.db
|
||||
execsql {
|
||||
BEGIN;
|
||||
CREATE TRIGGER trig1 BEFORE DELETE ON t1 BEGIN
|
||||
@ -65,7 +64,6 @@ do_test trigger9-1.2.3 {
|
||||
do_test trigger9-1.2.4 { execsql { ROLLBACK } } {}
|
||||
|
||||
do_test trigger9-1.3.1 {
|
||||
sqlite3 db test.db
|
||||
execsql {
|
||||
BEGIN;
|
||||
CREATE TRIGGER trig1 BEFORE DELETE ON t1 BEGIN
|
||||
@ -81,7 +79,6 @@ do_test trigger9-1.3.2 {
|
||||
do_test trigger9-1.3.3 { execsql { ROLLBACK } } {}
|
||||
|
||||
do_test trigger9-1.4.1 {
|
||||
sqlite3 db test.db
|
||||
execsql {
|
||||
BEGIN;
|
||||
CREATE TRIGGER trig1 BEFORE DELETE ON t1 WHEN old.x='1' BEGIN
|
||||
@ -97,7 +94,6 @@ do_test trigger9-1.4.2 {
|
||||
do_test trigger9-1.4.3 { execsql { ROLLBACK } } {}
|
||||
|
||||
do_test trigger9-1.5.1 {
|
||||
sqlite3 db test.db
|
||||
execsql {
|
||||
BEGIN;
|
||||
CREATE TRIGGER trig1 BEFORE UPDATE ON t1 BEGIN
|
||||
@ -113,7 +109,6 @@ do_test trigger9-1.5.2 {
|
||||
do_test trigger9-1.5.3 { execsql { ROLLBACK } } {}
|
||||
|
||||
do_test trigger9-1.6.1 {
|
||||
sqlite3 db test.db
|
||||
execsql {
|
||||
BEGIN;
|
||||
CREATE TRIGGER trig1 BEFORE UPDATE ON t1 BEGIN
|
||||
@ -129,7 +124,6 @@ do_test trigger9-1.6.2 {
|
||||
do_test trigger9-1.6.3 { execsql { ROLLBACK } } {}
|
||||
|
||||
do_test trigger9-1.7.1 {
|
||||
sqlite3 db test.db
|
||||
execsql {
|
||||
BEGIN;
|
||||
CREATE TRIGGER trig1 BEFORE UPDATE ON t1 WHEN old.x>='2' BEGIN
|
||||
@ -144,4 +138,83 @@ do_test trigger9-1.7.2 {
|
||||
} 1
|
||||
do_test trigger9-1.7.3 { execsql { ROLLBACK } } {}
|
||||
|
||||
do_test trigger9-3.1 {
|
||||
execsql {
|
||||
CREATE TABLE t3(a, b);
|
||||
INSERT INTO t3 VALUES(1, 'one');
|
||||
INSERT INTO t3 VALUES(2, 'two');
|
||||
INSERT INTO t3 VALUES(3, 'three');
|
||||
}
|
||||
} {}
|
||||
do_test trigger9-3.2 {
|
||||
execsql {
|
||||
BEGIN;
|
||||
CREATE VIEW v1 AS SELECT * FROM t3;
|
||||
CREATE TRIGGER trig1 INSTEAD OF UPDATE ON v1 BEGIN
|
||||
INSERT INTO t2 VALUES(old.a);
|
||||
END;
|
||||
UPDATE v1 SET b = 'hello';
|
||||
SELECT * FROM t2;
|
||||
ROLLBACK;
|
||||
}
|
||||
} {1 2 3}
|
||||
do_test trigger9-3.3 {
|
||||
# In this test the 'c' column of the view is not required by
|
||||
# the INSTEAD OF trigger, but the expression is reused internally as
|
||||
# part of the view's WHERE clause. Check that this does not cause
|
||||
# a problem.
|
||||
#
|
||||
execsql {
|
||||
BEGIN;
|
||||
CREATE VIEW v1 AS SELECT a, b AS c FROM t3 WHERE c > 'one';
|
||||
CREATE TRIGGER trig1 INSTEAD OF UPDATE ON v1 BEGIN
|
||||
INSERT INTO t2 VALUES(old.a);
|
||||
END;
|
||||
UPDATE v1 SET c = 'hello';
|
||||
SELECT * FROM t2;
|
||||
ROLLBACK;
|
||||
}
|
||||
} {2 3}
|
||||
do_test trigger9-3.4 {
|
||||
execsql {
|
||||
BEGIN;
|
||||
INSERT INTO t3 VALUES(3, 'three');
|
||||
INSERT INTO t3 VALUES(3, 'four');
|
||||
CREATE VIEW v1 AS SELECT DISTINCT a, b FROM t3;
|
||||
CREATE TRIGGER trig1 INSTEAD OF UPDATE ON v1 BEGIN
|
||||
INSERT INTO t2 VALUES(old.a);
|
||||
END;
|
||||
UPDATE v1 SET b = 'hello';
|
||||
SELECT * FROM t2;
|
||||
ROLLBACK;
|
||||
}
|
||||
} {1 2 3 3}
|
||||
do_test trigger9-3.5 {
|
||||
execsql {
|
||||
BEGIN;
|
||||
INSERT INTO t3 VALUES(1, 'uno');
|
||||
CREATE VIEW v1 AS SELECT a, b FROM t3 EXCEPT SELECT 1, 'one';
|
||||
CREATE TRIGGER trig1 INSTEAD OF UPDATE ON v1 BEGIN
|
||||
INSERT INTO t2 VALUES(old.a);
|
||||
END;
|
||||
UPDATE v1 SET b = 'hello';
|
||||
SELECT * FROM t2;
|
||||
ROLLBACK;
|
||||
}
|
||||
} {1 2 3}
|
||||
do_test trigger9-3.6 {
|
||||
execsql {
|
||||
BEGIN;
|
||||
INSERT INTO t3 VALUES(1, 'zero');
|
||||
CREATE VIEW v1 AS
|
||||
SELECT sum(a) AS a, max(b) AS b FROM t3 GROUP BY t3.a HAVING b>'two';
|
||||
CREATE TRIGGER trig1 INSTEAD OF UPDATE ON v1 BEGIN
|
||||
INSERT INTO t2 VALUES(old.a);
|
||||
END;
|
||||
UPDATE v1 SET b = 'hello';
|
||||
SELECT * FROM t2;
|
||||
ROLLBACK;
|
||||
}
|
||||
} {2}
|
||||
|
||||
finish_test
|
||||
|
Loading…
Reference in New Issue
Block a user