Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Procedure suspend check may cause restore to fail [CORE3003] #3385

Closed
firebird-automations opened this issue May 16, 2010 · 10 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

This has been fixed a couple of weeks ago.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 RC3 [ 10381 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Small note, fix was not completely correct and gbak show no warnings :)

	if \(tdbb\-\>getAttachment\(\)\-\>att\_flags & ATT\_gbak\_attachment\)
	\{

- PAR_warning(Arg::Gds(isc_illegal_prc_type) << Arg::Str(name));
+ PAR_warning(Arg::Warning(isc_illegal_prc_type) << Arg::Str(name));
}
else
{

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Mea culpa :-) To be fixed ASAP.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 2.1.4 [ 10361 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Version: 2.5 RC1 [ 10362 ]

Version: 3.0 Initial [ 10301 ]

Version: 2.1.3 [ 10302 ]

Version: 2.5 Beta 2 [ 10300 ]

Version: 2.5 Beta 1 [ 10251 ]

Version: 2.1.2 [ 10270 ]

Version: 2.1.1 [ 10223 ]

Version: 2.1.0 [ 10041 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA279 [ QA279 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment