mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
Reinstate the optimization of converting "a IN (C)" into "a=C" but only
if C is a constant. If the RHS is a table column, the complications of managing affinity and collations become too involved to mess with. FossilOrigin-Name: 8ac26a23d7f0ef29c5eb007c7467181f8b96102c8600ea8a5b15cc7584af27bd
This commit is contained in:
22
test/in.test
22
test/in.test
@ -765,19 +765,25 @@ do_execsql_test in-18.1 {
|
||||
#
|
||||
# Also ticket https://sqlite.org/src/info/29f635e0af71234b
|
||||
#
|
||||
do_execsql_test in-19.1 {
|
||||
do_execsql_test in-19.10 {
|
||||
DROP TABLE IF EXISTS t0;
|
||||
CREATE TABLE t0(c0 REAL UNIQUE);
|
||||
INSERT INTO t0(c0) VALUES(2.07093491255203046E18);
|
||||
SELECT 1 FROM t0 WHERE c0 IN ('2070934912552030444');
|
||||
INSERT INTO t0(c0) VALUES(2.0625E00);
|
||||
SELECT 1 FROM t0 WHERE c0 IN ('2.0625');
|
||||
} {1}
|
||||
do_execsql_test in-19.2 {
|
||||
SELECT c0 IN ('2070934912552030444') FROM t0;
|
||||
do_execsql_test in-19.20 {
|
||||
SELECT c0 IN ('2.0625') FROM t0;
|
||||
} {1}
|
||||
do_execsql_test in-19.3 {
|
||||
SELECT c0 IN ('2070934912552030444',2,3) FROM t0;
|
||||
do_execsql_test in-19.21 {
|
||||
SELECT c0 = ('2.0625') FROM t0;
|
||||
} {1}
|
||||
do_execsql_test in-19.4 {
|
||||
do_execsql_test in-19.22 {
|
||||
SELECT c0 = ('0.20625e+01') FROM t0;
|
||||
} {1}
|
||||
do_execsql_test in-19.30 {
|
||||
SELECT c0 IN ('2.0625',2,3) FROM t0;
|
||||
} {1}
|
||||
do_execsql_test in-19.40 {
|
||||
DROP TABLE t0;
|
||||
CREATE TABLE t0(c0 TEXT, c1 REAL, c2, PRIMARY KEY(c2, c0, c1));
|
||||
CREATE INDEX i0 ON t0(c1 IN (c0));
|
||||
|
Reference in New Issue
Block a user