1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Extra test cases for outer joins.

FossilOrigin-Name: c7505765280fb27ec2c8c4da6f87229a4078e3a4a27525226b6bf55864caa04b
This commit is contained in:
dan
2022-06-06 21:08:27 +00:00
parent c18fc6134e
commit 93c4087ffe
3 changed files with 50 additions and 8 deletions

View File

@ -587,4 +587,43 @@ do_execsql_test join8-18010 {
SELECT *, x NOTNULL, (x NOTNULL)=a FROM t2 RIGHT JOIN t1 ON true WHERE (x NOTNULL)=a;
} {}
do_execsql_test join8-18020 {
CREATE TABLE t3(z);
INSERT INTO t3 VALUES('t3value');
SELECT *, x NOTNULL, (x NOTNULL)=a FROM t2 RIGHT JOIN t1 ON true INNER JOIN t3 ON (x NOTNULL)=a;
} {}
ifcapable rtree {
do_execsql_test join8-18030 {
CREATE VIRTUAL TABLE rtree1 USING rtree(a, x1, x2);
INSERT INTO rtree1 VALUES(0, 0, 0);
}
do_execsql_test join8-18040 {
SELECT *, x NOTNULL, (x NOTNULL)=a FROM t2
RIGHT JOIN rtree1 ON true INNER JOIN t3 ON (x NOTNULL)=+a;
} {}
do_execsql_test join8-18050 {
SELECT *, x NOTNULL, (x NOTNULL)=a FROM t2
RIGHT JOIN rtree1 ON true INNER JOIN t3 ON (x NOTNULL)=a;
} {}
}
reset_db
do_execsql_test join8-19000 {
CREATE TABLE t1(a INT);
CREATE TABLE t2(b INT, c INT);
CREATE TABLE t3(d INT);
INSERT INTO t1 VALUES(10);
INSERT INTO t2 VALUES(50,51);
INSERT INTO t3 VALUES(299);
CREATE INDEX t2b ON t2( (b IS NOT NULL) );
}
do_execsql_test join8-19010 {
SELECT * FROM t1 LEFT JOIN t2 ON true INNER JOIN t3 ON (b IS NOT NULL)=0;
}
finish_test