context already in use (BLR error) for query used `with` and `subqueries`
-------------------------------------------------------------------------
Key: CORE-5759
URL: http://tracker.firebirdsql.org/browse/CORE-5759
Project: Firebird Core
Issue Type: Bug
Components: Engine
Affects Versions: 3.0.3
Environment: OS Name: Microsoft Windows 10 Pro N
OS Version: 10.0.16299 N/A Build 16299
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 15 Stepping 11
GenuineIntel ~2402 Mhz
Total Physical Memory: 3965 MB
Available Physical Memory: 635 MB
Virtual Memory: Max Size: 10109 MB
Virtual Memory: Available: 2264 MB
Virtual Memory: In Use: 7845 MB
Hotfix(s): 7 Hotfix(s) Installed.
[01]: KB4053577
[02]: KB4054022
[03]: KB4056887
[04]: KB4058702
[05]: KB4074595
[06]: KB4087256
[07]: KB4074588
Reporter: Artem Anufriev
I get error:
```
invalid request BLR at offset 204
context already in use (BLR error)
GDSCODE = 335544343
SQLCODE = -104
```
when try to execute this query:
```
with info as (
select
iif(1 in (select 1 as x from rdb$database), 1, 0) as flag
from rdb$database
)
select
iif(info.flag > 0, 1, 1) as a,
iif(info.flag > 0, 1, 1) as b,
0 as c
from info
```
This query works fine
- on Firebird 2.5.
- if you comment line with param `a` or param `b` (only one of them).
--
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
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel