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: (text/x-fossil-wiki)
Consider the following test case:

<pre>
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
</pre>

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

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

mrigger added on 2019-10-22 10:43:16: (text/x-fossil-wiki)
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.