-
-
Notifications
You must be signed in to change notification settings - Fork 108
Fix #418 - ALTER EVENT statement with DEFINER=user modifier fails to be parsed #421
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
Conversation
Codecov ReportBase: 97.25% // Head: 97.25% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #421 +/- ##
=========================================
Coverage 97.25% 97.25%
Complexity 2196 2196
=========================================
Files 68 68
Lines 5057 5059 +2
=========================================
+ Hits 4918 4920 +2
Misses 139 139
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Maybe a more complex definer would also be a good test
With @ or w/without backquotes ?
I'm on it, but I discovered something I wasn't expecting 😆 . I named my file I'll rename my file and start again, but I really do think this should be fixed on the |
…ndling of `DEFINER=…` on ALTER statements.
😆 😱 |
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.
Awesome !
Pull-request: #421 Signed-off-by: William Desportes <williamdes@wdes.fr>
Fix #418
I also improved the build process of Alter statements by adding a
trim
on it. Adding unit tests about theALTER DEFINER=user EVENT
builder gave me the unexpected results that an unwanted space can left at the end of the query, and already existing unit tests about the build of any Alter statement seemed to add that space in the expected value for no other reason that a lack of trimming here.To see how the
DEFINER=user
is now correctly handle, you can compare the.out
files from the 2 commits of the PR as the 1st one is the current status (unknown tokens and parsing errors are detected), while the 2nd one doesn't have any unknown token or parsing error.