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 subpartition option for 'partition by range columns' #233

Merged
merged 3 commits into from
Mar 18, 2019

Conversation

tiancaiamao
Copy link
Collaborator

What problem does this PR solve?

Parse

mysql> create table t1 (a varchar(5), b int signed, c varchar(10), d datetime)
    -> partition by range columns(b,c)
    -> subpartition by hash(to_seconds(d))
    -> ( partition p0 values less than (2, 'b'),
    -> partition p1 values less than (4, 'd'),
    -> partition p2 values less than (10, 'za'));
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 3 column 13 near "subpartition by hash(to_seconds(d))
( partition p0 values less than (2, 'b'),
partition p1 values less than (4, 'd'),
partition p2 values less than (10, 'za'))"

What is changed and how it works?

Parse subpartition and ignore it for 'partition by range columns'

Check List

Tests

  • Unit test

@tiancaiamao
Copy link
Collaborator Author

PTAL @lysu @jackysp

Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

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

LGTM

lysu
lysu previously approved these changes Mar 7, 2019
Copy link
Collaborator

@lysu lysu left a comment

Choose a reason for hiding this comment

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

LGTM

@lysu
Copy link
Collaborator

lysu commented Mar 7, 2019

@tiancaiamao please fix ci "unrecognized import path "golang.org/x/oauth2""

@tiancaiamao tiancaiamao merged commit 2575f2d into pingcap:master Mar 18, 2019
@tiancaiamao tiancaiamao deleted the range-column-subpartition branch March 18, 2019 13:55
tiancaiamao added 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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants