New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Engine crashes when use aggregate or window functions in recursive query [CORE4322] #4645
Comments
Modified by: @pavel-zotovAttachment: gdb-firebird.140121_234028.1.zip [ 12413 ] |
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @asfernandes . |
Modified by: @asfernandesVersion: 3.0 Alpha 1 [ 10331 ] Version: 2.5.2 Update 1 [ 10521 ] Version: 2.5.2 [ 10450 ] Version: 3.0 Alpha 2 [ 10560 ] summary: Engine crashes when use SUM()OVER() in recursive query => Engine crashes when use aggregate or window functions in recursive query |
Modified by: @asfernandesdescription: LI-T3.0.0.30813 SQL> with recursive r as(select 0 i,count(*)over() c from rdb$database union all select r.i+1,sum(i)over() from r where r.i<10) select * from r; Select Expression
============ ===================== Coredump see in attach. => LI-T3.0.0.30813 SQL> with recursive r as(select 0 i,count(*)over() c from rdb$database union all select r.i+1,sum(i)over() from r where r.i<10) select * from r; Select Expression
============ ===================== Coredump see in attach. Edit: 2.5: with recursive r as(select 0 i, count(*) c from rdb$database union all select r.i + 1, sum(i) from r where r.i < 10) select * from r; |
Commented by: @asfernandes Another related problem: aggregate functions usage are not verified correctly. -- Compiles, but should give an error. |
Commented by: @asfernandes I'm fixing this only in 3.0 for now. Will see about backport after fix review. |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Beta 1 [ 10332 ] |
Commented by: @pcisar Test created. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @pavel-zotov
Is related to QA588
Attachments:
gdb-firebird.140121_234028.1.zip
LI-T3.0.0.30813
SQL> with recursive r as(select 0 i,count(*)over() c from rdb$database union all select r.i+1,sum(i)over() from r where r.i<10) select * from r;
Select Expression
-> Recursion
-> Materialize
-> Window
-> Record Buffer
-> Table "R RDB$DATABASE" Full Scan
-> Materialize
-> Filter
============ =====================
Statement failed, SQLSTATE = 08006
Error reading data from the connection.
Coredump see in attach.
Edit:
2.5:
with recursive r as(select 0 i, count(*) c from rdb$database union all select r.i + 1, sum(i) from r where r.i < 10) select * from r;
Commits: d7550f6 9350f94 FirebirdSQL/fbt-repository@b540d6a FirebirdSQL/fbt-repository@41e5847
The text was updated successfully, but these errors were encountered: