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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user