1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Further improvements to codeEqualityTerm() for cases when an IN operator with

a right-hand side subquery is used as a constraint that needs to be processed
by the RIGHT JOIN non-matched logic.

FossilOrigin-Name: bb2798be3fb5737827eec505db2d4c8cb510d227d98fc26ce748bf2da7e8b382
This commit is contained in:
drh
2022-04-30 00:06:52 +00:00
parent c64f0e71c1
commit a25bbaf74a
4 changed files with 33 additions and 18 deletions

View File

@ -165,5 +165,12 @@ do_execsql_test join8-6000 {
SELECT * FROM t1 AS t2 NATURAL RIGHT JOIN t1 AS t3
WHERE (a,b) IN (SELECT rowid, b FROM t1);
} {1 A aa 2.5}
do_execsql_test join8-6010 {
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(a INT PRIMARY KEY, b TEXT, c TEXT, d INT) WITHOUT ROWID;
INSERT INTO t1 VALUES(15,'xray','baker',42);
SELECT value, t1.* FROM json_each('7') NATURAL RIGHT JOIN t1
WHERE (a,b) IN (SELECT a, b FROM t1);
} {7 15 xray baker 42}
finish_test