SQLite

View Ticket
Login
2016-07-01
20:12 Fixed ticket [e8d439c7]: Crash on transitive WHERE constraint and undefined collation plus 6 other changes (artifact: b9baf11a user: drh)
20:12
Fix the transitive constraint logic error that can result in a null pointer dereference. Fix for ticket [e8d439c77685eca6]. (check-in: 228a7879 user: drh tags: trunk)
20:08 New ticket [e8d439c7] Crash on transitive WHERE constraint and undefined collation. (artifact: 647e33df user: drh)

Ticket Hash: e8d439c77685eca6503ffbe8995b8945d8a80f55
Title: Crash on transitive WHERE constraint and undefined collation
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Unknown Resolution: Open
Last Modified: 2016-07-01 20:12:54
Version Found In: 3.13.0
User Comments:
drh added on 2016-07-01 20:08:28:

The SELECT statements in the following SQL provoke a NULL pointer deference:

CREATE TABLE t1(a INTEGER PRIMARY KEY);
CREATE TABLE t2(b INTEGER PRIMARY KEY, x1 INT COLLATE NOCASE);
CREATE TABLE t3(x2 INT);
SELECT * FROM t3, t2, t1 WHERE x2=b AND x1=a AND a=1;
SELECT * FROM t3, t2, t1 WHERE b=x2 AND a=x1 AND 1=a;

This problem was originally reported against System.Data.SQLite at https://system.data.sqlite.org/index.html/info/dd30ecb89d423c4c.