Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: Add sanity check for PLSQL inquiry directive size
$$ typed anywhere in the code, e.g. by accident, makes the rest of the code appear to the parser as a dollar-quoted string which can be thousands of bytes long. In this case lookupCaseKeyword() is called repeatedly on this ever increasing string which consumes a lot of time and makes the parser appear completely unresponsive for large files. This patch adds a sanity check to perform lookupCaseKeyword() only for strings of length smaller than 30 (currently the longest inquiry directive keyword is 21 characters long so there should be some safe extra margin even for longer keywords if added in the future). Fixes #3647.
- Loading branch information