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

Procedures and EXECUTE BLOCK without RETURNS should not be allowed to use SUSPEND [CORE6239] #6483

Closed
firebird-automations opened this issue Jan 30, 2020 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

This SP will be compiled without errors or warnings:

set term ^ ;
create or alter procedure sp_missed_returns_in_its_header as
begin
-- we use SUSPEND clause but there is no
-- output parameters in this SP header:
suspend;
end
^
set term ;^
commit;

But attempt to select from this SP will, of course, fail:

Statement failed, SQLSTATE = 42000
Dynamic SQL Error
-SQL error code = -84
-procedure SP_MISSED_RETURNS_IN_ITS_HEADER does not return any values

Commits: b2b5f9a

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

summary: Compiler can make more rigorous check for presense of RETURNS(...) clause in SP header when SP body contains SUSPEND. => Procedures and EXECUTE BLOCK without RETURNS should not be allowed to use SUSPEND

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 Beta 2 [ 10888 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

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

No branches or pull requests

2 participants