SQLite

View Ticket
Login
2020-04-24
17:55
New test case for ticket [1dcb4d44964846ad]. (check-in: 9e9f1e96 user: drh tags: trunk)
2020-02-13
22:12 Fixed ticket [1dcb4d44]: Incorrect query result when redundant terms appears in WHERE clause plus 5 other changes (artifact: 1a3d605b user: drh)
22:12
Fix problems in the constant propagation optimization that were introduced by check-in [1c3e5c20a9e6f501]. Fix for ticket [1dcb4d44964846ad] (check-in: c9a8defc user: drh tags: trunk)
20:37 New ticket [1dcb4d44] Incorrect query result when redundant terms appears in WHERE clause. (artifact: 2274c85b user: drh)

Ticket Hash: 1dcb4d44964846ad56e8cc74655f1d61d6e7f59b
Title: Incorrect query result when redundant terms appears in WHERE clause
Status: Fixed Type: Code_Defect
Severity: Minor Priority: Low
Subsystem: Unknown Resolution: Fixed
Last Modified: 2020-02-13 22:12:55
Version Found In:
User Comments:
drh added on 2020-02-13 20:37:37:

The following SQL generates an extra, incorrect result row:

CREATE TABLE t1(x TEXT);
CREATE TABLE t2(y TEXT);
INSERT INTO t1 VALUES('good'),('bad');
INSERT INTO t2 VALUES('good'),('bad');
SELECT * FROM t1 JOIN t2 ON x=y
 WHERE x='good' AND y='good';

This problem was reported on the mailing list by Jim Bosch. Bisecting shows that the malfunction was introduced by check-in [1c3e5c20a9e6f501] on 2020-01-08. That check-in appears in versions 3.31.0 and 3.31.1.