You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE PROCEDURE P1
AS
DECLARE VARIABLE V1 SMALLINT;
DECLARE C1 CURSOR FOR ( SELECT F1 FROM T1 );
BEGIN
OPEN C1;
WHILE (1=1) DO
BEGIN
FETCH C1 INTO :V1;
IF(ROW_COUNT = 1) THEN LEAVE;
END
CLOSE C1;
END;
COMMIT;
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.
Submitted by: @dyemanov
Is related to QA368
Test case:
CREATE TABLE T1 ( F1 SMALLINT );
CREATE PROCEDURE P1
AS
DECLARE VARIABLE V1 SMALLINT;
DECLARE C1 CURSOR FOR ( SELECT F1 FROM T1 );
BEGIN
OPEN C1;
WHILE (1=1) DO
BEGIN
FETCH C1 INTO :V1;
IF(ROW_COUNT = 1) THEN LEAVE;
END
CLOSE C1;
END;
COMMIT;
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.
Commits: a2eee6c
The text was updated successfully, but these errors were encountered: