Skip to content

The isc_array_lookup_bounds function returns invalid values for low and high array bounds #8100

@ViktorVDev

Description

@ViktorVDev

OFS_FB4.txt
OFS_FB5.txt
In FB5 and newer (tested for the latest snapshots of FB5 and FB6), there is an incorrect behavior upon calling the isc_array_lookup_bounds() function: the array bounds ALWAYS equal zero.

To reproduce, an EMPLOYEE.FDB from Firebird demo may be used.
The query used is: SELECT * FROM JOB.

Upon the further investigation it turned out that upon making a call for select fd.rdb$lower_bound, fd.rdb$upper_bound from rdb$field_dimensions fd where fd.rdb$field_name = ? order by fd.rdb$dimension

As the parameter's value, the value from the rdb$field_name field of the rdb$relation_fields table is sent, instead of sending the value of the rdb$field_source field of the aforementioned table.

Please see the attached results from the sniffer for FB4 (everything works properly) and FB5.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions