mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Do not attempt the exists-to-join optimization for expressions from the ON clause of joins.
FossilOrigin-Name: 4666433cbd9af21c2e0440b10bcb39878624a39485e2bb514553b276acb8a401
This commit is contained in:
@ -404,6 +404,23 @@ do_catchsql_test 6.1 {
|
||||
SELECT a FROM t1 WHERE EXISTS (SELECT 1 FROM t2 WHERE c COLLATE f = a)
|
||||
} {1 {no such collation sequence: f}}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
reset_db
|
||||
do_execsql_test 7.0 {
|
||||
CREATE TABLE t1(x);
|
||||
CREATE TABLE t2(y UNIQUE);
|
||||
|
||||
INSERT INTO t1 VALUES(1), (2);
|
||||
INSERT INTO t2 VALUES(1), (3);
|
||||
|
||||
SELECT * FROM t1 one LEFT JOIN t1 two ON (one.x=two.x AND EXISTS (
|
||||
SELECT 1 FROM t2 WHERE y=one.x
|
||||
));
|
||||
} {
|
||||
1 1
|
||||
2 {}
|
||||
}
|
||||
|
||||
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user