SQLite

View Ticket
Login
Ticket Hash: b47e3627ecaadbde9a0639878c4193208a7aca01
Title: Comparison of row values results in incorrect result
Status: Fixed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-10-22 10:43:16
Version Found In: 3.30.0
User Comments:
mrigger added on 2019-10-21 14:45:34:

Consider the following test case:

CREATE TABLE t0(c0 COLLATE NOCASE, c1);
INSERT INTO t0 VALUES('a', 'A');
SELECT * FROM t0 WHERE (+ t0.c1, 1) >= (t0.c0, 1); -- expected: row is not fetched, actual: row is fetched

I would not expect the row to be fetched, because the expression should evaluate to TRUE:

SELECT (+ t0.c1, 1) >= (t0.c0, 1) FROM t0; -- 0


mrigger added on 2019-10-22 10:43:16:

It seems that the check-in did not fix this issue-I detected the same bug again, and can still reproduce the issue on the current trunk.