SQLite

View Ticket
Login
2013-10-28
20:39 Fixed ticket [c620261b5b]: Incorrect result on query involving LEFT JOIN and transitive constraints plus 5 other changes (artifact: 566ec6c0bb user: drh)
20:38
Add regression tests for ticket [c620261b5b5]. (check-in: 05a35b09b1 user: drh tags: trunk)
20:15
Do not use transitive WHERE-clause constraints on LEFT JOINs. Fix for ticket [c620261b5b5dc]. (check-in: 9aac4e588c user: drh tags: trunk)
15:50 New ticket [c620261b5b] Incorrect result on query involving LEFT JOIN and transitive constraints. (artifact: 06e06d2c96 user: drh)

Ticket Hash: c620261b5b5dc7f16bb1440bfdf5ff66de672524
Title: Incorrect result on query involving LEFT JOIN and transitive constraints
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2013-10-28 20:39:11
11.54 years ago
Created: 2013-10-28 15:50:54
11.54 years ago
Version Found In: 3.8.1
User Comments:
drh added on 2013-10-28 15:50:54:

The following SQL should output a single result row, but in SQLite 3.8.1 it outputs no rows:

CREATE TABLE t1(a);
CREATE TABLE t2(b);
CREATE TABLE t3(c INTEGER PRIMARY KEY);
INSERT INTO t1 VALUES(1);
INSERT INTO t3 VALUES(1);
SELECT 'a row' FROM t1 LEFT JOIN t2 ON b=a JOIN t3 ON c=a;