You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 )
as
declare variable j integer;
begin
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
/* ... */
end
end
else if (1=1) then begin
Select RDB$TYPE from RDB$TYPES into :j; /* line 13, multiple rows exception happens here */
/* ... */
suspend;
end else if (2=3) then begin
/* ... */
suspend;
end
end /* line 20, call stack shows this line when `first 5` is used above */
^
set term ;^
commit;
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;
commit;
The text was updated successfully, but these errors were encountered:
Submitted by: @pcisar
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 )
as
declare variable j integer;
begin
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
/* ... */
end
end
else if (1=1) then begin
Select RDB$TYPE from RDB$TYPES into :j; /* line 13, multiple rows exception happens here */
/* ... */
suspend;
end else if (2=3) then begin
/* ... */
suspend;
end
end /* line 20, call stack shows this line when `first 5` is used above */
^
set term ;^
commit;
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;
commit;
The text was updated successfully, but these errors were encountered: