Issue Details (XML | Word | Printable)

Key: CORE-2943
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Alex Bekhtin
Votes: 0
Watchers: 0
Operations

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

parsing error recursive query with two recursive parts

Created: 25/Mar/10 10:30 AM   Updated: 03/May/11 10:03 AM
Component/s: Engine
Affects Version/s: 2.1.0, 2.5 Alpha 1, 2.1.1, 2.1.2, 2.5 Beta 1, 2.5 Beta 2, 2.1.3, 2.5 RC1, 2.5 RC2
Fix Version/s: 2.5 RC3, 2.1.4, 3.0 Alpha 1

Time Tracking:
Not Specified

Issue Links:
Relate
 

Planning Status: Unspecified


 Description  « Hide
-- correct
with recursive
    tree (NAME) as (
      select r.rdb$relation_name from rdb$relations r
      union all
      select r2.rdb$relation_name || tree.NAME from rdb$relations r2, tree
      where 1 = 0
    )
select * from tree

-- incrorrect
with recursive
    tree (NAME) as (
      select r.rdb$relation_name from rdb$relations r
      union all
      select r2.rdb$relation_name || tree.NAME from rdb$relations r2, tree
      where 1 = 0
    ),
    tree_2 as (
        select c.rdb$character_set_name from rdb$character_sets c
        union all
        select c2.rdb$character_set_name from rdb$character_sets c2, tree_2
        where 1 = 0
    )
select * from tree, tree_2

-------------
Dynamic SQL Error.
SQL error code = -206.
Column unknown.
TREE.NAME.
At line 5, column 43.

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 25/Mar/10 02:17 PM
The bug present since initial CTE implementation

Philippe Makowski added a comment - 03/May/11 10:03 AM
Q/A test ok