8000 Fix OracleParser block-depth underflow (#3871) by W25X80 · Pull Request #4073 · flyway/flyway · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix OracleParser block-depth underflow (#3871) #4073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
4656
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0