-
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
ddl: fix create table check for range columns partition #12622
Conversation
Every unique key on the table must use every column in the table's partitioning expression. Including range columns partitioned table.
PTAL @crazycs520 @winkyao @zimulala |
/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
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
/run-all-tests |
cherry pick to release-3.1 failed |
cherry pick to release-3.0 failed |
It seems that, not for sure, we failed to cherry-pick this commit to release-3.0. Please comment '/run-cherry-picker' to try to trigger the cherry-picker if we did fail to cherry-pick this commit before. @tiancaiamao PTAL. |
What problem does this PR solve?
This SQL should not success:
It should get an error like this:
"ERROR 1503 (HY000): A UNIQUE INDEX must include all columns in the table's partitioning function"
What is changed and how it works?
We checked the constraint for "partition by range", but forget the "partition by range columns".
Fix bug, check the constraint.
Check List
Tests
Related changes
Release note