Wrong line and column information after IF statement
----------------------------------------------------

                 Key: CORE-6385
                 URL: http://tracker.firebirdsql.org/browse/CORE-6385
             Project: Firebird Core
          Issue Type: Bug
          Components: Engine
    Affects Versions: 3.0.6, 4.0 Beta 2
            Reporter: Adriano dos Santos Fernandes


------
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 CORE-5183 fix but the actual 
problem is the way we used to get positions when backtrack happens.

-- 
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

        


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to