SQLite

View Ticket
Login
Ticket Hash: 30e2c183b6b356e4e4b871d582b28f184f5a2c7c
Title: column = NULL predicate evaluates to TRUE for rtree table
Status: Fixed Type: Code_Defect
Severity: Minor Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-12-05 13:35:06
Version Found In: 3.30.0
User Comments:
mrigger added on 2019-12-05 08:12:30:

Consider the following test case:

CREATE VIRTUAL TABLE rt0 USING rtree(c0, c1, c2);
INSERT INTO rt0(c0) VALUES(0);
SELECT * FROM rt0 WHERE rt0.c0 = NULL; -- unexpected: row is fetched

Unexpectedly, the row is fetched, even though the predicate rt0.c0 = NULL should evaluate to FALSE:

SELECT (rt0.c0 = NULL) IS TRUE FROM rt0; -- 0