1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Disable the query flattener optimization for SELECT statements that are on

the RHS of vector IN operators.  This is a hack that fixes the bug
described in ticket [da7841375186386c]. A better solution that does not
disable the query flattener is needed, but this will server for the time
being.

FossilOrigin-Name: 005d5b870625d175fdf3c0e87d974006c569d9e1
This commit is contained in:
drh
2016-11-17 13:13:25 +00:00
parent d2d69cc1fa
commit 54cda4edbe
4 changed files with 25 additions and 8 deletions

View File

@@ -202,5 +202,19 @@ foreach {tn idx} {
#-------------------------------------------------------------------------
# 2016-11-17. Query flattening in a vector SELECT on the RHS of an IN
# operator. Ticket https://www.sqlite.org/src/info/da7841375186386c
#
do_execsql_test 5.0 {
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
CREATE TABLE T1(a TEXT);
INSERT INTO T1(a) VALUES ('aaa');
CREATE TABLE T2(a TEXT PRIMARY KEY,n INT);
INSERT INTO T2(a, n) VALUES('aaa',0);
SELECT * FROM T2
WHERE (a,n) IN (SELECT T1.a, V.n FROM T1, (SELECT * FROM (SELECT 0 n)) V);
} {aaa 0}
finish_test