-
-
Notifications
You must be signed in to change notification settings - Fork 260
Closed
Description
Consider following INCORRECT script (it contains wrong token in RETURNUNG clause: "AS" instead of "INTO"):
recreate table test(id int);
insert into test(id) values(null);
set term ^;
execute block as
declare v_id int;
begin
update test set id = -id returning id as v_id; -- this is WRONG; "INTO" must be here
end
^
set term ;^
Its output will be:
- in FB 2.5:
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Token unknown - line 4, column 43
-as
- in FB 3.0.8.33465:
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Unexpected end of command - line 4, column 40
(looks strange because all commands appear to have tokens of completion; but anyway, we can easy find problem place because of non-zero line/column values)
- in FB 4.0.0.2479:
Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -104
-Unexpected end of command - line 0, column 0
This output is much worse: we can not find problem place because of zeroes for line/column.