Overview
Artifact ID: | 20f0d40ca31e132ae529d94400eb0eff4f00abb4 |
---|---|
Ticket: | bfbf38e5e9956ac69f9491e5112636ff2ecef923
Segfault on a nested join |
User & Date: | drh 2012-11-02 12:30:55 |
Changes
- comment changed to:
Reported on the mailing list: <blockquote><pre> CREATE TABLE AAA ( aaa_id INTEGER PRIMARY KEY AUTOINCREMENT ); CREATE TABLE RRR ( rrr_id INTEGER PRIMARY KEY AUTOINCREMENT, rrr_date INTEGER NOT NULL, rrr_aaa INTEGER ); CREATE TABLE TTT ( ttt_id INTEGER PRIMARY KEY AUTOINCREMENT, target_aaa INTEGER NOT NULL, source_aaa INTEGER NOT NULL ); insert into AAA (aaa_id) values (2); insert into TTT (ttt_id, target_aaa, source_aaa) values (4469, 2, 2); insert into TTT (ttt_id, target_aaa, source_aaa) values (4476, 2, 1); insert into RRR (rrr_id, rrr_date, rrr_aaa) values (0, 0, NULL); insert into RRR (rrr_id, rrr_date, rrr_aaa) values (2, 4312, 2); SELECT i.aaa_id, (SELECT sum(CASE WHEN (t.source_aaa == i.aaa_id) THEN 1 ELSE 0 END) FROM TTT t ) AS segfault FROM (SELECT curr.rrr_aaa as aaa_id FROM RRR curr -- you also can comment out the next line -- it causes segfault to happen after one row is outputted INNER JOIN AAA a ON (curr.rrr_aaa = aaa_id) LEFT JOIN RRR r ON (r.rrr_id <> 0 AND r.rrr_date < curr.rrr_date) GROUP BY curr.rrr_id HAVING r.rrr_date IS NULL ) i; </pre></blockquote>
- Untracked field detected: "Application_Fault"
- foundin changed to: "trunk:2012-11-02"
- private_contact changed to: "21acf606a926cf9bbf2ac304bb3928dcd0e489fe"
- severity changed to: "Critical"
- status changed to: "Open"
- subsystem changed to: "Unknown"
- title changed to: "Segfault on a nested join"
- type changed to: "Code_Defect"