-
Notifications
You must be signed in to change notification settings - Fork 490
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: check invalid column define option for generated columns #201
Conversation
@kennytm PTAL |
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
@spongedu Thanks for contribution. For the build-integration failure, please file a PR to pingcap/tidb to update the parser dependency, and change this test to test for parse failure. cc @winkyao pingcap/tidb#8620. |
@kennytm ok |
…gcap#201) * parser: add check on column options * add related tests * add more tests * fix ident problems * fix bug * Code refine according to reviewer's opinion
…gcap#201) * parser: add check on column options * add related tests * add more tests * fix ident problems * fix bug * Code refine according to reviewer's opinion
What problem does this PR solve?
As is described in MySQL Reference, generated column definitions have this syntax below:
some column options such as
DEFAULT
,AUTO_INCREMENT
,ON UPDATE
are not supported for generate column definition. A parser error should be raised with these options.What is changed and how it works?
Add an check in parser when
ColumnDef
is created for generated columns.Check List
Tests
Code changes
Side effects
Related changes