Skip to content
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

Merged
merged 6 commits into from Aug 15, 2018

Conversation

@imtbkcat
Copy link
Contributor

commented Aug 14, 2018

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 of LOAD DATA.

Check List

Tests

  • Unit test

Code changes

  • Has exported variable/fields change

Side effects

no

Related changes

@@ -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

This comment has been minimized.

Copy link
@jackysp

jackysp Aug 14, 2018

Member

CharsetOpt should behind TableName.

imtbkcat added 2 commits Aug 14, 2018
@imtbkcat

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2018

/run-all-tests

@imtbkcat

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2018

PTAL @jackysp

@imtbkcat

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2018

/run-all-tests

Copy link
Member

left a comment

LGTM

Copy link
Member

left a comment

LGTM

@@ -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

This comment has been minimized.

Copy link
@jackysp

jackysp Aug 15, 2018

Member

Please remove the last space.

@imtbkcat imtbkcat merged commit 4684eec into pingcap:master Aug 15, 2018
4 checks passed
4 checks passed
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
@imtbkcat imtbkcat deleted the imtbkcat:fix7348 branch Aug 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.