Issue Details (XML | Word | Printable)

Key: CORE-4354
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Pavel Zotov
Votes: 0
Watchers: 2

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

Parsing of recursive query returns error "Column does not belong to referenced table" for source that HAS such column

Created: 25/Feb/14 09:57 AM   Updated: 23/Sep/15 12:41 PM
Component/s: Engine
Affects Version/s: 3.0 Alpha 2
Fix Version/s: 3.0 Beta 1

Issue Links:

QA Status: Done successfully

 Description  « Hide
LI-T6.3.0.30889 Firebird 3.0 Alpha 2

with recursive
b as (
    select 0 rc
    from rdb$database qa

    union all

    select b.rc+1
    from b
        join rdb$database q1 on q1.rdb$relation_id*0=b.rc*0
        join rdb$database q2 on q2.rdb$relation_id*0=b.rc*0
    where b.rc=0
select * from b

Result: "Column does not belong to referenced table." (seems that it is 'b.rc' column that is source of trouble).

Same query in LI-V6.3.3.26744 Firebird 2.5 runs OK and return two rows (0 and 1).
The problem disappears if second join: "join rdb$database q2 on q2.rdb$relation_id*0=b.rc*0" - is commented out.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Pavel Cisar added a comment - 23/Sep/15 12:41 PM
Test created.