Compilation of Firebird procedures - Firebird 3.0 (Win) doesn't check
procedures parameters
-------------------------------------------------------------------------------------------
Key: CORE-6381
URL: http://tracker.firebirdsql.org/browse/CORE-6381
Project: Firebird Core
Issue Type: Bug
Affects Versions: 3.0.5
Environment: Firebird 3.0.5 (Windows only)
Reporter: Kevin Smith
Priority: Minor
Consider following example.
First create two dependent procedures:
set term ^;
create or alter procedure A
(
Val integer
)
returns
(
RValue integer
)
as
begin
RValue = RValue * 2;
end
^
create or alter procedure B
returns
(
RValue integer
)
as
begin
execute procedure A(10)
returning_values(RValue);
end
Next alter one of procedure (add input parameter) without altering second
procedure:
set term ^;
create or alter procedure A
(
Val integer,
X integer
)
returns
(
RValue integer
)
as
begin
RValue = RValue * X;
end
^
Finally, try to compile procedures:
update rdb$procedures set RDB$PROCEDURE_SOURCE = null where
(RDB$PROCEDURE_SOURCE is not null) and (rdb$system_flag=0);
commit;
In Firebird 2.5 and Firebird 3.0 (Linux) we've got error (which is obviously
correct and expected)
/*******************************************************************************
The next statement causes the following error:
can't format message 13:99 -- message file C:\Softhard\firebird.msg not found.
Error while parsing procedure B's BLR.
invalid request BLR at offset 32.
Input parameter mismatch for procedure A.
*******************************************************************************/
commit;
However Firebird 3.0 (Win) allow us to compile such procedures. That lead us to
having database which we can backup but cannot restore, because of error:
gbak:creating indexes
gbak:committing metadata
gbak: ERROR:invalid request BLR at offset 32
gbak: ERROR: Input parameter mismatch for procedure A
gbak:Exiting before completion due to errors
--
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