1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Do not confuse the ">" operator with IS NOT NULL when checking to see if

a partial index is usable.
[forum:/forumpost/d813704d7c|Forum post d813704d7c].

FossilOrigin-Name: 8cc23931d61b7d78521acce93fc2603649c5813c7a0869cb2c1bde2c8c4e51b4
This commit is contained in:
drh
2021-05-29 23:07:59 +00:00
parent d36bcec9ad
commit d65b7e36ec
4 changed files with 20 additions and 9 deletions

View File

@@ -498,4 +498,14 @@ do_execsql_test index6-17.3 {
SELECT COUNT(*) FROM t0 WHERE t0.c0 GLOB t0.c0;
} {1}
# 2021-05-29
# Forum https://sqlite.org/forum/forumpost/d813704d7c
reset_db
do_execsql_test index6-18.1 {
CREATE TABLE t1(a INT, b INT);
INSERT INTO t1 VALUES(10,10);
CREATE UNIQUE INDEX t1b ON t1(b) WHERE a>NULL;
SELECT * FROM t1 WHERE a IS NOT NULL;
} {10 10}
finish_test