Re: [sqlite] Bug in 3.25.2 (RECURSIVE CTE + window function)

2018-12-31 Thread Dan Kennedy
On 12/30/2018 02:41 PM, Nicolas Roy-Renaud wrote: I've been dealing with occasional segfaults on one of my applications when running a similar query, except even on SQLite 3.26, the safeguard wouldn't trigger. Running the SQL query specified in the bug report description from the tracker

Re: [sqlite] Bug in 3.25.2 (RECURSIVE CTE + window function)

2018-12-30 Thread Nicolas Roy-Renaud
I've been dealing with occasional segfaults on one of my applications when running a similar query, except even on SQLite 3.26, the safeguard wouldn't trigger. Running the SQL query specified in the bug report description from the tracker (https://www.sqlite.org/src/tktview?name=e8275b415a)

Re: [sqlite] Bug in 3.25.2 (RECURSIVE CTE + window function)

2018-09-27 Thread Richard Hipp
Thanks for the report and test case. Now fixed on trunk and on branch-3.25. On 9/25/18, Щекин Ярослав wrote: > Hello. > > Here's the self-contained test case: > > WITH t(id, parent) AS ( > SELECT CAST(1 AS INT), CAST(NULL AS INT) > UNION ALL > SELECT 2, NULL > UNION ALL > SELECT 3, 1 > UNION

[sqlite] Bug in 3.25.2 (RECURSIVE CTE + window function)

2018-09-27 Thread Щекин Ярослав
Hello. Here's the self-contained test case: WITH t(id, parent) AS ( SELECT CAST(1 AS INT), CAST(NULL AS INT) UNION ALL SELECT 2, NULL UNION ALL SELECT 3, 1 UNION ALL SELECT 4, 1 UNION ALL SELECT 5, 2 UNION ALL SELECT 6, 2 ), q AS ( SELECT t.*, ROW_NUMBER() OVER (ORDER BY t.id) AS rn FROM t