Procedure suspend check may cause restore to fail [CORE3003] #3385
Labels
affect-version: 2.1.0
affect-version: 2.1.1
affect-version: 2.1.2
affect-version: 2.1.3
affect-version: 2.5 Beta 1
affect-version: 2.5 Beta 2
affect-version: 2.5 RC1
affect-version: 2.5 RC2
affect-version: 3.0 Initial
component: engine
fix-version: 2.1.4
fix-version: 2.5 RC3
fix-version: 3.0 Alpha 1
priority: major
qa: done successfully
type: bug
Submitted by: @ibaseru
Is related to QA279
Firebird 2.5 have new funtionality, that checks existance of SUSPEND statement in procedure being called via SELECT statement. If procedure does not contain SUSPEND, SELECTing from procedure will cause an error:
Procedure ... is not selectable (it does not contain a SUSPEND statement).
This seems to be ok, but same error can happen during RESTORE, and restore will fail.
Example:
1.
create or alter procedure A
returns (
OUT integer)
AS
declare variable i integer;
begin
select emp_no from employee
where EMP_NO = 1
into :out;
suspend;
end
2.
create or alter procedure B
AS
declare variable i int;
begin
SELECT out from a
into :i;
end
3.
create or alter procedure A
returns (
OUT integer)
AS
declare variable i integer;
begin
select emp_no from employee
where EMP_NO = 1
into :out;
end
This will not cause any error, because dependency from procedure B and procedure A call method is not checked.
4. make backup, make restore. You will get ERROR
gbak: ERROR:invalid request BLR at offset 30
gbak: ERROR: Procedure A is not selectable (it does not contain a SUSPEND statement)
gbak:Exiting before completion due to errors
This is exactly the same problem, that exists with the change of parameter number or type of the procedure being called from another procedure. So, we have new one case of non-restorable backup.
I suggest to change this at least from ERROR to WARNING.
Commits: dea4d36
The text was updated successfully, but these errors were encountered: