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 storage engine and VALUE IN MAXVALUE #542

Merged
merged 4 commits into from
Sep 6, 2019

Conversation

yangwenmai
Copy link
Contributor

What problem does this PR solve?

fix issues: #500

MySQL Syntax:
ALTER TABLE ..., ADD PARTITION ( PARTITION ... STORAGE ENGINE text_string ...)

Bad Case

ALTER TABLE d_n.t_n WITHOUT VALIDATION , ADD PARTITION ( PARTITION ident VALUES LESS THAN ( MAXVALUE ) STORAGE ENGINE text_string MAX_ROWS 12 );
ALTER TABLE d_n.t_n WITH VALIDATION , ADD PARTITION NO_WRITE_TO_BINLOG (PARTITION ident VALUES LESS THAN MAXVALUE STORAGE ENGINE = text_string, PARTITION ident VALUES LESS THAN ( MAXVALUE ) (SUBPARTITION text_string MIN_ROWS 11));
ALTER TABLE d_n.t_n WITHOUT VALIDATION , ADD PARTITION ( PARTITION ident VALUES IN ( MAXVALUE ) STORAGE ENGINE text_string MAX_ROWS 12 );
ALTER TABLE d_n.t_n WITH VALIDATION , ADD PARTITION NO_WRITE_TO_BINLOG ( PARTITION ident VALUES IN ( MAXVALUE ) STORAGE ENGINE text_string MAX_ROWS 12 );
ALTER TABLE d_n.t_n WITH VALIDATION , ADD PARTITION NO_WRITE_TO_BINLOG (PARTITION ident VALUES LESS THAN MAXVALUE STORAGE ENGINE = text_string, PARTITION ident VALUES IN ( MAXVALUE ) (SUBPARTITION text_string MIN_ROWS 11));

Check List

Tests

  • Unit test

@CLAassistant
Copy link

CLAassistant commented Sep 4, 2019

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link

codecov bot commented Sep 4, 2019

Codecov Report

Merging #542 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #542   +/-   ##
=======================================
  Coverage   71.77%   71.77%           
=======================================
  Files          32       32           
  Lines        7802     7802           
=======================================
  Hits         5600     5600           
  Misses       1674     1674           
  Partials      528      528
Impacted Files Coverage Δ
parser.go 70.58% <ø> (ø) ⬆️
ast/misc.go 74.46% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 09396da...c381646. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 4, 2019

Codecov Report

Merging #542 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #542   +/-   ##
=======================================
  Coverage   71.76%   71.76%           
=======================================
  Files          32       32           
  Lines        7813     7813           
=======================================
  Hits         5607     5607           
  Misses       1676     1676           
  Partials      530      530
Impacted Files Coverage Δ
parser.go 70.58% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8bb738...48b7e9c. Read the comment docs.

Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

parser.y Outdated Show resolved Hide resolved
Copy link
Contributor

@tangenta tangenta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

parser.y Outdated Show resolved Hide resolved
parser.y Outdated Show resolved Hide resolved
parser.y Outdated Show resolved Hide resolved
parser.y Outdated Show resolved Hide resolved
Copy link
Contributor

@tangenta tangenta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please resolve the conflicts? You need to run make parser after updating parser.y.

parser.y Outdated Show resolved Hide resolved
Copy link
Contributor

@zier-one zier-one left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zier-one zier-one merged commit 8550cee into pingcap:master Sep 6, 2019
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
lyonzhi pushed a commit to lyonzhi/parser that referenced this pull request Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants