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-issue-importer opened this issue May 4, 2007 · 10 comments
Closed

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

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

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented May 4, 2007

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 4, 2007

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 4, 2007

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 5, 2007

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 5, 2007

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 20, 2007

Modified by: @pcisar

Link: This issue is related to QA149 [ QA149 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 26, 2007

Commented by: @pmakowski

Q/A tested ok

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 26, 2007

Modified by: @pmakowski

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 28, 2008

Modified by: @pcisar

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 19, 2016

Modified by: @pavel-zotov

QA Status: No test

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 19, 2016

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants