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

Disqualify row-value comparisons for use by an index if the right-hand side

has an affinity that does not match the index.
Fix for ticket [6ef984af8972c2eb]

FossilOrigin-Name: 5c118617cf08e17a6edfdfba86e3fc49132a780990b68b52724c2aaeac85f506
This commit is contained in:
drh
2019-10-22 19:51:29 +00:00
parent 98c94e60d0
commit db36e255d5
4 changed files with 20 additions and 8 deletions

View File

@ -586,4 +586,13 @@ do_execsql_test 23.110 {
SELECT 3 FROM t0 WHERE (aa,1) <= (SELECT +bb,1);
} {0 1 3}
# 2019-10-22 Ticket 6ef984af8972c2eb
do_execsql_test 24.100 {
DROP TABLE t0;
CREATE TABLE t0(c0 TEXT PRIMARY KEY);
INSERT INTO t0(c0) VALUES ('');
SELECT (t0.c0, TRUE) > (CAST(0 AS REAL), FALSE) FROM t0;
SELECT 2 FROM t0 WHERE (t0.c0, TRUE) > (CAST('' AS REAL), FALSE);
} {1 2}
finish_test