Repository navigation
MDEV-41606 Support line comments in optimizer hints - #5935
Open
Chaitanya-970 wants to merge 1 commit into
Open
Chaitanya-970 wants to merge 1 commit into
Chaitanya-970 wants to merge 1 commit into
Conversation
Optimizer hints reject SQL-style -- comments, causing the whole hint block to be ignored. Skip line comments between tokens using the SQL lexer's whitespace and control-character rule. Add regression coverage for comments between hints and arguments, quoted identifiers, trailing comments, CRLF input and diagnostic line numbers. Assisted-by: Codex:gpt-6-astra
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements MDEV-41606.
Optimizer hints currently reject SQL-style
--comments, causing the whole hint block to be ignored. Teach the tokenizer to skip line comments between tokens, using the SQL lexer's whitespace and control-character rule.The regression covers comments between hints and arguments, quoted identifiers, trailing comments, CRLF input and syntax-error line numbers.
Tested on a Linux Debug build:
--ps-protocoland--cursor-protocol.I submit this contribution under the BSD-new license.