Issue Details (XML | Word | Printable)

Key: CORE-1244
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Yakov Hrebtov
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
Firebird Core

Server crash on select * from <recursive CTE>

Created: 04/May/07 01:27 PM   Updated: 19/Jan/16 05:48 AM
Component/s: Engine
Affects Version/s: 2.1 Alpha 1
Fix Version/s: 2.1 Beta 1

Environment: LI-T2.1.0.15707 CS
Issue Links:

QA Status: Done successfully

 Description  « Hide
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

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 04/May/07 04:26 PM
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 ||
select_item->nod_arg[e_derived_field_name])->str_data, select_item))

here we have NULL context

Adriano, could you look at it ?

Adriano dos Santos Fernandes added a comment - 04/May/07 10:38 PM
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.)

Philippe Makowski added a comment - 26/Jul/07 12:40 PM
Q/A tested ok