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-issue-importer opened this issue Jan 30, 2020 · 5 comments

Comments

@firebird-issue-importer

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 31, 2020

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 4, 2020

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 4, 2020

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 4.0 Beta 2 [ 10888 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 5, 2020

Modified by: @pavel-zotov

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

QA Status: No test => Done successfully

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Feb 5, 2020

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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants