Skip to content

Wrong line and column information after IF statement [CORE6385] #6624

@firebird-automations

Description

@firebird-automations

Submitted by: @asfernandes

------
execute block
as
declare n integer;
begin
if (1 = 1) then
n = 1;
n = n / 0;
end!

Statement failed, SQLSTATE = 22012
arithmetic exception, numeric overflow, or string truncation
-Integer divide by zero. The code attempted to divide an integer value by an integer divisor of zero.
-At block line: 5, col: 5
------

The correct (line, column) of the error should be (7, 5).

I've tracked this as a regression introduced with CORE5183 fix but the actual problem is the way we used to get positions when backtrack happens.

Commits: dfcb0ba 1d70384

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions