|
From: Vlad K. (JIRA) <tr...@fi...> - 2013-07-19 08:36:31
|
Error "context already in use (BLR error)" when preparing a query with UNION
-----------------------------------------------------------------------------
Key: CORE-4144
URL: http://tracker.firebirdsql.org/browse/CORE-4144
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 2.5.2 Update 1
Reporter: Vlad Khorsun
It was discovered when researching bug CORE-4005, but it is not depends on recursive queries.
Simplified example:
select n
from
(
select d.rdb$relation_id as n from rdb$database d
union all
select d.rdb$relation_id as n from rdb$database d
)
union all
select cast(1 as bigint) from rdb$database d
At prepare time error is raised:
Invalid token.
invalid request BLR at offset 24.
context already in use (BLR error).
The bug happens when :
- first member of UNION is derived table, and
- data type of first field of that derived table is impliciltly CAST'ed to the type of whole UNION (int -> bigint in example above)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|