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-issue-importer opened this issue Jul 3, 2007 · 12 comments
Closed

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

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

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Jul 3, 2007

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 3, 2007

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 4, 2007

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 8, 2007

Commented by: Maycon Ferraca (ferraca)

Any chance to fix this issue?

Thanks

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 28, 2008

Modified by: @pcisar

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 20, 2008

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 21, 2008

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 2.5 Beta 1 [ 10251 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 5, 2009

Modified by: @asfernandes

Link: This issue relate to CORE2584 [ CORE2584 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 23, 2011

Modified by: @pcisar

Link: This issue is related to QA329 [ QA329 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 31, 2011

Commented by: @pcisar

Test added.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 31, 2011

Modified by: @pcisar

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 19, 2016

Modified by: @pavel-zotov

QA Status: No test

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 19, 2016

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