Asynchronous cancellation request can be ignored in the case of EXECUTE STATEMENT and WHEN used together [CORE4356] #4678
Labels
affect-version: 2.1.0
affect-version: 2.1.1
affect-version: 2.1.2
affect-version: 2.1.3
affect-version: 2.1.4
affect-version: 2.1.5 Update 1
affect-version: 2.1.5
affect-version: 2.5.0
affect-version: 2.5.1
affect-version: 2.5.2 Update 1
affect-version: 2.5.2
affect-version: 3.0 Alpha 1
affect-version: 3.0 Alpha 2
component: engine
priority: major
type: bug
Submitted by: @pavel-zotov
Artificial test case:
set term ^;
execute block as
declare stt varchar(255) = 'execute block as begin while (1 = 1) do begin end end';
begin
while(1=1) do
begin
execute statement stt;
when any do begin end
end
end^
set term ;^
commit;
Then either press Ctrl-C in the current ISQL session or issue "delete from mon$statements where mon$attachment_id <> current_connection" from a different ISQL session.
The endless loop inside EXECUTE STATEMENT really gets interrupted but isc_cancelled error gets handled by the WHEN block and the outer loop continues. This is a bug, cancellation/shutdown errors should not be processed by exception handlers.
The text was updated successfully, but these errors were encountered: