SQLite

View Ticket
Login
2019-09-03
13:35 Fixed ticket [29f635e0]: IS NULL unexpectedly evaluates to TRUE plus 6 other changes (artifact: be050867 user: drh)
2019-09-02
22:14 Fixed ticket [29f635e0]. (artifact: 781749e7 user: drh)
22:13
Fix a bug introduced earlier today by check-in [88833a9c2849c959]. Ticket [29f635e0af71234b] (check-in: 6e7b4527 user: drh tags: trunk)
19:22 New ticket [29f635e0] IS NULL unexpectedly evaluates to TRUE. (artifact: 34ebd7c7 user: mrigger)

Ticket Hash: 29f635e0af71234be40dfc8d3d31bb7ff5b07a1a
Title: IS NULL unexpectedly evaluates to TRUE
Status: Fixed Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-09-03 13:35:00
Version Found In: 3.29.0
User Comments:
mrigger added on 2019-09-02 19:22:41:

Consider the test case below:

CREATE TABLE t0(c0 TEXT, c1 REAL, c2, PRIMARY KEY(c2, c0, c1));
CREATE INDEX i0 ON t0(c1 IN (c0));
INSERT INTO t0(c0, c2) VALUES (0, NULL) ON CONFLICT(c2, c1, c0) DO NOTHING;
UPDATE t0 SET c2 = x'';
SELECT * FROM t0 WHERE t0.c2 IS NULL; -- unexpected: row is fetched

The row is fetched, even though the WHERE condition should evaluate to FALSE:

SELECT t0.c2 IS NULL FROM t0; -- expected: FALSE


drh added on 2019-09-02 22:14:19:

The problem was introduced by a check-in earlier today that was itself a fix for ticket [2841e99d104c6436].