SQLite

View Ticket
Login
2013-06-03
13:23 New ticket [bc1aea7b] Incorrect result on LEFT JOIN with OR constraints and an ORDER BY clause. (artifact: a92b978f user: drh)
2012-10-09
21:07
Merge the fix for ticket [d02e1406a58ea02] into trunk. (check-in: dd34bec3 user: drh tags: trunk)
2012-10-04
19:41 Fixed ticket [d02e1406]: LEFT JOIN with an OR in the ON clause causes segfault plus 2 other changes (artifact: 4a446dbe user: drh)
16:00
Candidate fix for ticket [d02e1406a58ea02]. (check-in: 81fd941d user: drh tags: branch-3.7.14)
15:26 New ticket [d02e1406] LEFT JOIN with an OR in the ON clause causes segfault. (artifact: 28fef2d3 user: drh)

Ticket Hash: d02e1406a58ea02de21627afaea1a5acd3a2e673
Title: LEFT JOIN with an OR in the ON clause causes segfault
Status: Fixed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2012-10-04 19:41:35
Version Found In: 3.7.14
Description:
The following SQL results in a segfault while running the SELECT statement.
CREATE TABLE t1(a,b,c);
INSERT INTO t1 VALUES(1,2,3), (4,5,6);
CREATE TABLE t2(d,e,f);
INSERT INTO t2 VALUES(3,6,9), (4,8,12);
SELECT * FROM t1 AS x LEFT JOIN t2 AS y ON (y.d=x.c) OR (y.e=x.b);

This problem was initially reported on the mailing list. The problem appears to have been introduced by check-in [62678be3df35cdcb091] and first appeared in version 3.7.14.