Skip to content
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

ErrorHandler takes long time at deep nested mismatched parentheses. #2968

Closed
miniway opened this issue Feb 28, 2020 · 0 comments · Fixed by #2970
Closed

ErrorHandler takes long time at deep nested mismatched parentheses. #2968

miniway opened this issue Feb 28, 2020 · 0 comments · Fixed by #2970
Assignees
Labels
bug Something isn't working

Comments

@miniway
Copy link
Contributor

miniway commented Feb 28, 2020

I found a case that it took long time, more than an hour, at a syntax error.

This is a simplified reproducing test case.

// TestSqlParserErrorHandling.java
@Test(timeOut = 10000)
public void testAnotherPossibleExponentialBacktracking()
{
    testStatement("SELECT id FROM t WHERE\n" +
                    "(f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "OR (f()\n" +
                    "GROUP BY id",
            "message");
}
@martint martint self-assigned this Feb 28, 2020
@martint martint added the bug Something isn't working label Feb 28, 2020
@martint martint mentioned this issue Feb 29, 2020
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants