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

ddl: fix creating partition table with unique prefix index (#17196) #17213

Merged
merged 4 commits into from
May 21, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented May 14, 2020

cherry-pick #17196 to release-4.0


What problem does this PR solve?

create table t1 (a varchar(20), b binary, unique index (a(5))) partition by range columns (a) (
    partition p0 values less than ('aaaaa'),
    partition p1 values less than ('bbbbb'),
    partition p2 values less than ('ccccc')
);

MySQL: A UNIQUE INDEX must include all columns in the table's partitioning function
TiDB: no error

Problem Summary:

Unique prefix index can't be used on the partition table.

What is changed and how it works?

Proposal: xxx

What's Changed:

How it Works:

Add check

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Release note

  • Fix the check of create and alter table, unique prefix index must not be used on the partition table

@sre-bot
Copy link
Contributor Author

sre-bot commented May 14, 2020

/run-all-tests

@sre-bot sre-bot added sig/sql-infra SIG: SQL Infra priority/release-blocker This issue blocks a release. Please solve it ASAP. type/4.0-cherry-pick type/bugfix This PR fixes a bug. labels May 14, 2020
@sre-bot sre-bot requested review from bb7133 and crazycs520 May 14, 2020 10:41
@sre-bot sre-bot added this to the 4.0.0-rc.2 milestone May 14, 2020
Copy link
Contributor

@XuHuaiyu XuHuaiyu left a comment

Choose a reason for hiding this comment

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

LGTM

@bb7133 bb7133 modified the milestones: 4.0.0-rc.2, v4.0.0-ga May 19, 2020
Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

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

Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

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

LGTM

@zimulala zimulala added the status/can-merge Indicates a PR has been approved by a committer. label May 21, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented May 21, 2020

Sorry @zimulala, you don't have permission to trigger auto merge event on this branch.

@jebter
Copy link

jebter commented May 21, 2020

/merge

@sre-bot
Copy link
Contributor Author

sre-bot commented May 21, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented May 21, 2020

@sre-bot merge failed.

@jebter
Copy link

jebter commented May 21, 2020

/run-integration-copr-test

@jebter
Copy link

jebter commented May 21, 2020

/merge

@sre-bot
Copy link
Contributor Author

sre-bot commented May 21, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented May 21, 2020

@sre-bot merge failed.

@jebter
Copy link

jebter commented May 21, 2020

/run-integration-copr-test

@jebter jebter merged commit cbfdf8a into pingcap:release-4.0 May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/release-blocker This issue blocks a release. Please solve it ASAP. sig/sql-infra SIG: SQL Infra status/can-merge Indicates a PR has been approved by a committer. type/bugfix This PR fixes a bug. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants