-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
parser: support to character option to load data statement #7391
Conversation
parser/parser.y
Outdated
@@ -6821,7 +6821,7 @@ RevokeStmt: | |||
* See https://dev.mysql.com/doc/refman/5.7/en/load-data.html | |||
*******************************************************************************************/ | |||
LoadDataStmt: | |||
"LOAD" "DATA" LocalOpt "INFILE" stringLit "INTO" "TABLE" TableName Fields Lines ColumnNameListOptWithBrackets | |||
"LOAD" "DATA" LocalOpt "INFILE" stringLit "INTO" "TABLE" TableName Fields Lines ColumnNameListOptWithBrackets CharsetOpt |
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.
CharsetOpt should behind TableName.
/run-all-tests |
PTAL @jackysp |
/run-all-tests |
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
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
parser/parser.y
Outdated
@@ -6821,25 +6821,29 @@ RevokeStmt: | |||
* See https://dev.mysql.com/doc/refman/5.7/en/load-data.html | |||
*******************************************************************************************/ | |||
LoadDataStmt: | |||
"LOAD" "DATA" LocalOpt "INFILE" stringLit "INTO" "TABLE" TableName Fields Lines ColumnNameListOptWithBrackets | |||
"LOAD" "DATA" LocalOpt "INFILE" stringLit "INTO" "TABLE" TableName CharsetOpt Fields Lines ColumnNameListOptWithBrackets |
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.
Please remove the last space.
What problem does this PR solve?
Fix #7348 to make some JDBC test cases happy.
What is changed and how it works?
Add a CNF grammar to support
CHARACTER SET <charset_name>
at the end ofLOAD DATA
.Check List
Tests
Code changes
Side effects
no
Related changes