Skip to content
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

Server crash on select * from <recursive CTE> [CORE1244] #1668

Closed
firebird-automations opened this issue May 4, 2007 · 10 comments
Closed

Server crash on select * from <recursive CTE> [CORE1244] #1668

firebird-automations opened this issue May 4, 2007 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Yakov Hrebtov (jake)

Is related to QA149

Simple select from recursive CTE crashes the server when query uses asterisk.

with recursive
Art_Tree as (
select A.ArticleID
from Articles A
where A.ParentID is NULL

    union all

    select A\.ArticleID
      from Articles A
           join Art\_Tree T on \(A\.ParentID=T\.ArticleID\)
\)

select *
from Art_Tree

Commits: c08581d

@firebird-automations
Copy link
Collaborator Author

Modified by: Yakov Hrebtov (jake)

description: Simple select from recursive CTE crashes then server when query uses asterisk.

with recursive
Art_Tree as (
select A.ArticleID
from Articles A
where A.ParentID is NULL

    union all

    select A\.ArticleID
      from Articles A
           join Art\_Tree T on \(A\.ParentID=T\.ArticleID\)
\)

select *
from Art_Tree

=>

Simple select from recursive CTE crashes the server when query uses asterisk.

with recursive
Art_Tree as (
select A.ArticleID
from Articles A
where A.ParentID is NULL

    union all

    select A\.ArticleID
      from Articles A
           join Art\_Tree T on \(A\.ParentID=T\.ArticleID\)
\)

select *
from Art_Tree

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

It is broken in 1.316 version of dsql\pass1.cpp

AV source is in pass1_expand_select_node at line 4860 :

if (!hide_using ||
context->getImplicitJoinField(reinterpret_cast<dsql_str*>(
select_item->nod_arg[e_derived_field_name])->str_data, select_item))
{
stack.push(select_item);
}

here we have NULL context

Adriano, could you look at it ?

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Quick (but correct) fix without look yet why the derived table is without the context.

(Pavel: note the bug was not really with Alpha1 or Beta1, but with snapshot between two versions.)

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.1 Beta 1 [ 10141 ]

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA149 [ QA149 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pmakowski

Q/A tested ok

@firebird-automations
Copy link
Collaborator Author

Modified by: @pmakowski

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 12012 ] => Firebird [ 14152 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test => Done successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants