mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Fix an assert() failure that could occur in a join query if the RHS of an IN() operator is a list containing correlated expressions. This problem was introduced by checkin [e130319317e7611938] which was part of the fix for ticket [787fa716be3a7f650c] - so this commit is part of that ticket's fix too.
FossilOrigin-Name: 778b1224a318d0137c7dab8361128f593506d3677267898119b934b4d66dfe38
This commit is contained in:
@ -306,4 +306,25 @@ do_eqp_test 7.4 {
|
||||
`--SEARCH TABLE t4 USING INDEX t4xz (x=?)
|
||||
}
|
||||
|
||||
reset_db
|
||||
do_execsql_test 8.0 {
|
||||
CREATE TABLE t0 (c0, c1, PRIMARY KEY (c0, c1));
|
||||
CREATE TABLE t1 (c0);
|
||||
|
||||
INSERT INTO t1 VALUES (2);
|
||||
|
||||
INSERT INTO t0 VALUES(0, 10);
|
||||
INSERT INTO t0 VALUES(1, 10);
|
||||
INSERT INTO t0 VALUES(2, 10);
|
||||
INSERT INTO t0 VALUES(3, 10);
|
||||
}
|
||||
|
||||
do_execsql_test 8.1 {
|
||||
SELECT * FROM t0, t1
|
||||
WHERE (t0.c1 >= 1 OR t0.c1 < 1) AND t0.c0 IN (1, t1.c0) ORDER BY 1;
|
||||
} {
|
||||
1 10 2
|
||||
2 10 2
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user