SQLite
View Ticket
Not logged in
Ticket UUID: d58ccbb3f1b7cf54cdac178799408816fb7c073f
Title: Segmentation fault on a valid query with "union"
Status: Fixed Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2013-01-28 19:00:28
Version Found In: 3.7.15.2
User Comments:
anonymous added on 2013-01-28 10:28:40:

The following SQL run in a shell generates a segmentation fault:

create view v0 as select 0 as n;
create view v1 as select * from v0 union select * from v0;
create view v2 as select * from v1 union select * from v1;
create view v3 as select * from v2 union select * from v2;
create view v4 as select * from v3 union select * from v3;
create view v5 as select * from v4 union select * from v4;
create view v6 as select * from v5 union select * from v5;
create view v7 as select * from v6 union select * from v6;
create view v8 as select * from v7 union select * from v7;
create view v9 as select * from v8 union select * from v8;
create view v10 as select * from v9 union select * from v9;
create view v11 as select * from v10 union select * from v10;
create view v12 as select * from v11 union select * from v11;
create view v13 as select * from v12 union select * from v12;
create view v14 as select * from v13 union select * from v13;
create view v15 as select * from v14 union select * from v14;
create view v16 as select * from v15 union select * from v15;
create view v17 as select * from v16 union select * from v16;
create view v18 as select * from v17 union select * from v17;
create view v19 as select * from v18 union select * from v18;
create view v20 as select * from v19 union select * from v19;

This fault has been present in the code since version 3.7.15.2, 2013-01-09 and early.