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
Operations

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:
Relate
 

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
Adriano dos Santos Fernandes made changes - 26/Feb/14 07:42 PM
Field Original Value New Value
Assignee Adriano dos Santos Fernandes [ asfernandes ]
Adriano dos Santos Fernandes made changes - 06/Mar/14 04:22 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.0 Beta 1 [ 10332 ]
Resolution Fixed [ 1 ]
Pavel Cisar made changes - 29/Mar/14 05:56 PM
Link This issue is related to QA-593 [ QA-593 ]
Pavel Zotov made changes - 29/May/15 09:38 PM
Status Resolved [ 5 ] Resolved [ 5 ]
QA Status Done successfully
Pavel Cisar added a comment - 23/Sep/15 12:41 PM
Test created.

Pavel Cisar made changes - 23/Sep/15 12:41 PM
Status Resolved [ 5 ] Closed [ 6 ]