CREATE TABLE T1 ( F1 SMALLINT );
CREATE PROCEDURE P1
DECLARE VARIABLE V1 SMALLINT;
DECLARE C1 CURSOR FOR ( SELECT F1 FROM T1 );
WHILE (1=1) DO
FETCH C1 INTO :V1;
IF(ROW_COUNT = 1) THEN LEAVE;
EXECUTE PROCEDURE P1;
Unsuccessful execution caused by a system error that precludes
successful execution of subsequent statements.
Internal gds software consistency check (pointer page vanished from DPM_next (249), file: dpm.cpp line: 1645).
While this example looks like an intentional infinite loop, I believe we should mirror our API behaviour for such situations and throw an error for the invalid (outside the EOF marker) fetch operation.