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

AV using recursive query as subquery in SELECT list and ORDER'ing by them [CORE2783] #3174

Closed
firebird-automations opened this issue Dec 2, 2009 · 8 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @hvlad

Is related to QA273

This query make AV in engine

SELECT RDB$RELATION_ID,
(WITH RECURSIVE
NUM (ID) AS
(
SELECT 1 FROM RDB$DATABASE

       UNION ALL

       SELECT ID \+ 1
         FROM NUM
        WHERE ID < 10
     \)
    SELECT MAX\(ID\) FROM NUM
   \) AS NNN

FROM RDB$DATABASE
ORDER BY NNN

There is workaround. This query is equal and works ok :

WITH RECURSIVE
NUM (ID) AS
(
SELECT 1 FROM RDB$DATABASE

       UNION ALL

       SELECT ID \+ 1
         FROM NUM
        WHERE ID < 10

)
SELECT RDB$RELATION_ID, (SELECT MAX(ID) FROM NUM) AS NNN
FROM RDB$DATABASE
ORDER BY NNN

Commits: 8ef2bbd 5fa620a 1dc03fa

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Open [ 1 ] => In Progress [ 3 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

test mail #⁠2

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: In Progress [ 3 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 RC2 [ 10372 ]

Fix Version: 2.1.4 [ 10361 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA273 [ QA273 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pmakowski

Q/A test made

@firebird-automations
Copy link
Collaborator Author

Modified by: @pmakowski

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Done successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment