Skip to content

Conversation

@W25X80
Copy link

@W25X80 W25X80 commented May 1, 2025

Fix OracleParser underflow in PACKAGE BODY parsing

Handle END specially and guard generic END with blockDepth>0 to prevent the “unable to decrease block depth below 0” error.

Handle END <pkg> specially and guard generic END with blockDepth>0 to prevent underflow.
@JasonLuo-Redgate
Copy link

Hi @W25X80 ,

Could you provide a sample SQL segment that currently causes a parsing issue, and which this PR is intended to fix?

@W25X80
Copy link
Author

W25X80 commented Jun 12, 2025

Hi @JasonLuo-Redgate ,

CREATE OR REPLACE PACKAGE AFCSYS.ACCESS_RIGHTS AS
    PROCEDURE set_context (roleId IN NUMBER, userId IN NUMBER);
END AFCSYS.ACCESS_RIGHTS;

CREATE OR REPLACE PACKAGE BODY AFCSYS.ACCESS_RIGHTS AS
    PROCEDURE set_context (roleId IN NUMBER, userId IN NUMBER) IS
    BEGIN
       NULL;
    END set_context;
END AFCSYS.ACCESS_RIGHTS;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants