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

Bug with a simple case and a subquery [CORE1343] #1762

Closed
firebird-automations opened this issue Jul 3, 2007 · 12 comments
Closed

Bug with a simple case and a subquery [CORE1343] #1762

firebird-automations opened this issue Jul 3, 2007 · 12 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Maycon Ferraca (ferraca)

Relate to CORE2584
Is related to QA329

It seems to me a bug with a simple case and a subquery:

Example:

--works fine (searched case with a subquery)
SELECT
CASE
WHEN (SELECT 'A' FROM RDB$DATABASE) = 'A' THEN
'Y'
WHEN (SELECT 'A' FROM RDB$DATABASE) = 'B' THEN
'B'
ELSE
'N'
END
FROM RDB$DATABASE

--works fine (simple case without a subquery)
SELECT
CASE 'A'
WHEN 'A' THEN
'Y'
WHEN 'B' THEN
'N'
ELSE
'U'
END
FROM RDB$DATABASE

--don't work (simple case with a subquery)
SELECT
CASE (SELECT 'A' FROM RDB$DATABASE)
WHEN 'A' THEN
'Y'
WHEN 'B' THEN
'N'
ELSE
'U'
END
FROM RDB$DATABASE

/*
Invalid token.
invalid request BLR at offset 110.
context already in use (BLR error).
*/

Commits: 9150e6f e54682e

@firebird-automations
Copy link
Collaborator Author

Modified by: Maycon Ferraca (ferraca)

description: It seems to me a bug with a simple case and a subquery:

Example:

--works fine (searched case with a subquery)
SELECT
CASE
WHEN (SELECT 'A' FROM RDB$DATABASE) = 'A' THEN
'Y'
WHEN (SELECT 'A' FROM RDB$DATABASE) = 'B' THEN
'B'
ELSE
'N'
END
FROM RDB$DATABASE

--works fine (simple case without a subquery)
SELECT
CASE 'A'
WHEN 'A' THEN
'Y'
WHEN 'B' THEN
'N'
ELSE
'U'
END
FROM RDB$DATABASE

--don't work (simple case without a subquery)
SELECT
CASE (SELECT 'A' FROM RDB$DATABASE)
WHEN 'A' THEN
'Y'
WHEN 'B' THEN
'N'
ELSE
'U'
END
FROM RDB$DATABASE

/*
Invalid token.
invalid request BLR at offset 110.
context already in use (BLR error).
*/

=>

It seems to me a bug with a simple case and a subquery:

Example:

--works fine (searched case with a subquery)
SELECT
CASE
WHEN (SELECT 'A' FROM RDB$DATABASE) = 'A' THEN
'Y'
WHEN (SELECT 'A' FROM RDB$DATABASE) = 'B' THEN
'B'
ELSE
'N'
END
FROM RDB$DATABASE

--works fine (simple case without a subquery)
SELECT
CASE 'A'
WHEN 'A' THEN
'Y'
WHEN 'B' THEN
'N'
ELSE
'U'
END
FROM RDB$DATABASE

--don't work (simple case with a subquery)
SELECT
CASE (SELECT 'A' FROM RDB$DATABASE)
WHEN 'A' THEN
'Y'
WHEN 'B' THEN
'N'
ELSE
'U'
END
FROM RDB$DATABASE

/*
Invalid token.
invalid request BLR at offset 110.
context already in use (BLR error).
*/

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Version: 2.1 Alpha 1 [ 10150 ]

Version: 2.0.1 [ 10090 ]

Version: 2.0.0 [ 10091 ]

Version: 2.0.2 [ 10130 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Maycon Ferraca (ferraca)

Any chance to fix this issue?

Thanks

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 12492 ] => Firebird [ 15260 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 Beta 1 [ 10251 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Link: This issue relate to CORE2584 [ CORE2584 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA329 [ QA329 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

Test added.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test => Done successfully

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