Skip to content

CallableStatement.getXXX(String) may return value from wrong column #771

@mrotteveel

Description

@mrotteveel

The implementation in FBCallableStatement.getXXX(String) identifies the index of the result set column using ResultSet.findColumn(String), and then calls the equivalent FBCallableStatement.getXXX(int) method. The problem is that getXXX(int) expects the registered OUT parameter index and not the result set index, and will remap columns.

If the index was mapped as an OUT parameter which corresponds to a different result set column, it can return the value of that different column. In theory, the implementation can also throw an exception with message "Specified parameter does not exist", though the current implementation has that option disabled.

This fix should be backported to Jaybird 4.0.10 and 5.0.3 as well.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions