Skip to content

Error "invalid stream" can be raised in some cases while matching a computed index [CORE4139] #4466

Closed
@firebird-automations

Description

@firebird-automations

Submitted by: @dyemanov

Votes: 1

Test case:

create table A (ID int);
create table B (ID int);
create index IDX on A computed by (ID);

select min( (select 1 from A where cast(ID as int) = http://B.ID) ) from B
-- ERROR: bad BLR -- invalid stream.

This error is not present if computed index is not created or if CAST is omitted inside the query.

Commits: 123415b FirebirdSQL/fbt-repository@06db666 FirebirdSQL/fbt-repository@dd21f7d

====== Test Details ======

Confirmed fail on WI-V2.5.2.26540:
Statement failed, SQLSTATE = HY000
bad BLR -- invalid stream