Skip to content

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

@firebird-automations

Description

@firebird-automations

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions