-
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 of character in create table statement #7378
Conversation
@@ -6094,6 +6094,17 @@ StringType: | |||
} | |||
$$ = x | |||
} | |||
| "NATIONAL" "CHARACTER" FieldLen OptBinary OptCollate |
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.
Can we define a new parser rule like:
CharOrCharacter:
"CHAR" | "CHARACTER"
Then we could merge this into the first branch.
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.
Ok.
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.
@shenli
NationalOpt could be empty, "CHAR(10)" is legal, but "CHARACTER(10)" is illegal in MySQL. There must be a "NATIONAL" before "CHARACTER".
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.
OK
LGTM |
/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
@@ -6094,6 +6094,17 @@ StringType: | |||
} | |||
$$ = x | |||
} | |||
| "NATIONAL" "CHARACTER" FieldLen OptBinary OptCollate |
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.
OK
What problem does this PR solve?
Fix #7371 to make some JDBC test cases happy.
What is changed and how it works?
Support
NATIONAL CHARACTER
type in create table statement, likecreate table t (c1 NATIONAL CHARACTER(10));
by add parser rules. BecauseNATIONAL CHARACTER
is same asNATIONAL CHAR
, just change parser is okay.Reference link: https://dev.mysql.com/doc/refman/5.7/en/charset-national.html
Check List
Tests
Code changes
Side effects
no
Related changes
no