Issue Details (XML | Word | Printable)

Key: CORE-1343
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Maycon Ferraca
Votes: 0
Watchers: 0
Operations

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

Bug with a simple case and a subquery

Created: 03/Jul/07 01:07 PM   Updated: 31/Mar/11 11:23 AM
Component/s: Engine
Affects Version/s: 2.0.0, 2.0.1, 2.1 Alpha 1, 2.1 Beta 1, 2.0.2
Fix Version/s: 2.5 Beta 1

Time Tracking:
Not Specified

Issue Links:
Relate


 Description  « Hide
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).
*/

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Maycon Ferraca added a comment - 08/Aug/07 07:16 AM
Any chance to fix this issue?

Thanks

Pavel Cisar added a comment - 31/Mar/11 11:23 AM
Test added.