Hi,

I discovered a bug, which is demonstrated through the following test case:

CREATE TABLE t0(c0);
CREATE INDEX index_0 ON t0(c0) WHERE (~c0) NOT NULL;
INSERT INTO t0(c0) VALUES (NULL);
SELECT * FROM t0 WHERE (LIKELY(~c0) OR TRUE);

No row is fetched, although the WHERE clause is always TRUE. I could
reproduce this bug only when creating a partial index, and when using
either LIKELY or UNLIKELY. The datatype of the c0 column seems to
irrelevant. PRAGMA integrity_check; and REINDEX could not detect this error.

Best,
Manuel
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to