Incorrect line number is shown in call stack

                 Key: CORE-5354
             Project: Firebird Core
          Issue Type: Bug
    Affects Versions: 2.5.6
            Reporter: Pavel Cisar

Sample code below demonstrates incorrect line number in call stack.

Commenting out 'first 5' in another 'select' statement above
(in the code block which is not even executed)
fixes the line number shown in call stack.

(removing works the same as commenting out)

Some stored procedures are quite big and it would be really helpful
to know correct line number in case of similar errors.

set term ^;
create or alter procedure tmp_sp
returns (i integer )
  declare variable j integer;
  if (1=2) then begin
    for select first 5 RDB$TYPE from RDB$TYPES into :j /* not executed, comment 
out `first 5` to get correct line number in call stack */
    do begin
      /* ... */
  else if (1=1) then begin
    Select RDB$TYPE from RDB$TYPES into :j; /* line 13, multiple rows exception 
happens here */
    /* ... */
  end else if (2=3) then begin
    /* ... */
end /* line 20, call stack shows this line when `first 5` is used above */
set term ;^

select * from tmp_sp; /* should raise multiple rows exception at line 13, not 
20 */
/*multiple rows in singleton select
-At procedure 'TMP_SP' line: 20, col: 1*/

drop procedure tmp_sp;

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


Firebird-Devel mailing list, web interface at

Reply via email to