-
Notifications
You must be signed in to change notification settings - Fork 524
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
fix parsing of identifiers after %
symbol
#927
Conversation
If/when this is merged, I plan to make a 0.36.1 release that includes this fix |
Some(sch) if self.dialect.is_identifier_start('%') => { | ||
self.tokenize_identifier_or_keyword([ch, *sch], chars) | ||
} | ||
_ => self.consume_and_return(chars, Token::Mod), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the bug fix. At is at this point the %
has been consumed by chars.next() so calling
consume_and_return` skips another character by accident
It probably doesn't matter for ' '
but it does matter for everything else in this match arm
Pull Request Test Coverage Report for Build 5616064223
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks for the reviews @izveigor and @crepererum -- I should point out that I studied the rest of the change carefully and I did not find similar bugs in the handling of |
Fixes a bug in parsing 'c%d1
where the
d` was accidentally consumed.Introduced in #913 released in sqlparser-rs 036.0
Closes #926