mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Simplify a branch in the "*" expansion logic. New test case for an
INSTEAD OF trigger on a RIGHT and FULL outer join. FossilOrigin-Name: d2717348f43b571c7bb58498e0c723331abf85de174189e66aca2c438ca26d5f
This commit is contained in:
@ -11,8 +11,8 @@
|
||||
#
|
||||
# This file implements tests for JOINs that use Bloom filters.
|
||||
#
|
||||
# The test case output is all generated by PostgreSQL 14. This test module
|
||||
# was created as follows:
|
||||
# The test case output is (mostly) all generated by PostgreSQL 14. This
|
||||
# test module was created as follows:
|
||||
#
|
||||
# 1. Run a TCL script (included at the bottom of this file) that
|
||||
# generates an input script for "psql" that will run man
|
||||
@ -26,6 +26,9 @@
|
||||
#
|
||||
# 4. Add this header, and the script content at the footer.
|
||||
#
|
||||
# A few extra tests that were not generated from postgresql output are
|
||||
# added at the end.
|
||||
#
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
db nullvalue -
|
||||
@ -2897,7 +2900,41 @@ do_execsql_test joinD-64 {
|
||||
- - - - - - 200 0 - -
|
||||
- - - - - - - - 300 0
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
# The following are extra tests added manually
|
||||
|
||||
do_execsql_test joinD-1000 {
|
||||
CREATE VIEW v1 AS
|
||||
SELECT *
|
||||
FROM t1 INNER JOIN t2 ON t1.b=t2.b AND t2.x>0
|
||||
RIGHT JOIN t3 ON t1.c=t3.c AND t3.y>0
|
||||
LEFT JOIN t4 ON t1.d=t4.d AND t4.z>0;
|
||||
CREATE TRIGGER v1r1 INSTEAD OF UPDATE OF c ON v1 BEGIN
|
||||
UPDATE t1 SET c=new.c WHERE (a,b,c,d) IS (old.a,old.b,old.c,old.d);
|
||||
UPDATE t3 SET c=new.c WHERE (c,y) IS (old.c,old.y);
|
||||
END;
|
||||
SELECT * FROM v1 WHERE y BETWEEN 30 AND 40 ORDER BY y;
|
||||
} {
|
||||
30 130 230 330 130 30 230 30 330 30
|
||||
- - - - - - 233 33 - -
|
||||
36 136 236 336 136 36 236 36 - -
|
||||
- - - - - - 239 39 - -
|
||||
}
|
||||
do_execsql_test joinD-1010 {
|
||||
BEGIN;
|
||||
UPDATE v1 SET c=c+1000 WHERE y BETWEEN 30 and 40;
|
||||
SELECT * FROM v1 WHERE y BETWEEN 30 AND 40 ORDER BY y;
|
||||
ROLLBACK;
|
||||
} {
|
||||
30 130 1230 330 130 30 1230 30 330 30
|
||||
- - - - - - 233 33 - -
|
||||
36 136 1236 336 136 36 1236 36 - -
|
||||
- - - - - - 239 39 - -
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
#############################################################################
|
||||
# This is the TCL script used to generate the psql script that generated
|
||||
# the data above.
|
||||
|
Reference in New Issue
Block a user