SQLite

View Ticket
Login
2012-11-02
12:58 Ticket [bfbf38e5] Segfault on a nested join status still Open with 3 other changes (artifact: 23d9feb9 user: drh)
2012-05-21
21:26 Fixed ticket [c2ad16f9]: Segfault on query involving deeply nested aggregate views plus 1 other change (artifact: 4ffb3f4e user: drh)
21:26
Merge the nested aggregate query fix (ticket [c2ad16f997ee9c8ed]) unto trunk. (check-in: e459c336 user: drh tags: trunk)
20:13
Candidate fix for the nested aggregate query problem of ticket [c2ad16f997ee9c8e]. (check-in: f3dd1faf user: drh tags: nested-agg)
19:11
Convert the NameContext object from using u8 booleans to using individual bits in a single u8 as its booleans. This change might become a basis for a fix for [c2ad16f997ee9c]. (check-in: 72226096 user: drh tags: nested-agg)
17:14 Ticket [c2ad16f9] Segfault on query involving deeply nested aggregate views status still Open with 1 other change (artifact: b8ae6879 user: drh)
16:54 Ticket [c2ad16f9]: 1 change (artifact: ef46bef5 user: drh)
04:31 Ticket [c2ad16f9]: 3 changes (artifact: 956d8d76 user: mistachkin)
03:24 Add attachment c2ad16f99-bug.txt to ticket [c2ad16f9] (artifact: a5868656 user: drh)
03:21 New ticket [c2ad16f9] Segfault on query involving deeply nested aggregate views. (artifact: 24e75e76 user: drh)

Ticket Hash: c2ad16f997ee9c8ed9d3cc4bc5a3da5397a074ec
Title: Segfault on query involving deeply nested aggregate views
Status: Fixed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2012-05-21 21:26:35
Version Found In: 3.7.12
Description:
Running the attached script (which consists of the schema of Skrooge following by a single query) results in a segfault. The original bug report can be seen at https://bugs.kde.org/show_bug.cgi?id=300183 and the report on the SQLite mailing list is at http://www.mail-archive.com/sqlite-users%40sqlite.org/msg70289.html

Bisecting suggests that the problem was inserted by check-in [430bb59d798286a86c351].


drh added on 2012-05-21 16:54:14:
Simpler test case:

CREATE TABLE t1(x,y);
SELECT max((SELECT a FROM (SELECT count(1) AS a FROM t1))) FROM t1;

drh added on 2012-05-21 17:14:14:
Another simple test case:

CREATE TABLE t1(x);
CREATE TABLE t2(y);
SELECT max((SELECT avg(x) FROM t2)) FROM t1;

Attachments: