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

Cannot use an automatic index on the right table of a RIGHT JOIN because

automatic indexes must be WHERE_IDX_ONLY, but the RIGHT JOIN post-processing
does not know how to work with an index-only scan.

FossilOrigin-Name: beb4401dc09fb68e85ddcf3f99598527691535d0eb7693168f440e5a5a076e3f
This commit is contained in:
drh
2022-04-10 23:48:47 +00:00
parent 9debb58e48
commit 529394e5c1
4 changed files with 17 additions and 9 deletions

View File

@ -69,10 +69,17 @@ foreach {id schema} {
INSERT INTO t2 VALUES(3,33),(4,44),(5,55);
CREATE VIEW dual(dummy) AS VALUES('x');
}
8 {
CREATE TABLE t1(a INT, b INT);
INSERT INTO t1 VALUES(1,2),(1,3),(1,4);
CREATE TABLE t2(c INT, d INT);
INSERT INTO t2 VALUES(3,33),(4,44),(5,55);
CREATE VIEW dual(dummy) AS VALUES('x');
}
} {
reset_db
db nullvalue NULL
db eval $schema
do_execsql_test join7-$id.setup $schema {}
do_execsql_test join7-$id.1 {
SELECT b, d FROM t1 FULL OUTER JOIN t2 ON b=c ORDER BY +b;
} {