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 drop index failed when index contain auto_increment column and the auto_increment column is primary key (#15861) #16008

Merged
merged 3 commits into from
Apr 14, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Apr 2, 2020

cherry-pick #15861 to release-3.0


Signed-off-by: crazycs520 crazycs520@gmail.com

What problem does this PR solve?

Before this PR:

mysql>create table t3 (a int auto_increment key, b int, index idx(b,a))
Query OK, 0 rows affected
Time: 0.074s
mysql>alter table t3 drop index idx;   -- should sucessful.
(1075, u'Incorrect table definition; there can be only one auto column and it must be defined as a key')

What is changed and how it works?

Fix DDL drop index with auto_increament check function bug.

Related changes

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)

Side effects

Release note

Fix issue of drop index failed when index contain auto_increment column and the auto_increment column is the primary key.

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 2, 2020

/run-all-tests

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/LGT1 Indicates that a PR has LGTM 1. label Apr 8, 2020
@crazycs520 crazycs520 closed this Apr 13, 2020
@crazycs520 crazycs520 reopened this Apr 13, 2020
Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

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

LGTM

@crazycs520
Copy link
Contributor

/run-all-tests

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

sre-bot commented Apr 14, 2020

Your auto merge job has been accepted, waiting for 16117, 16326, 16310

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 14, 2020

/run-all-tests

@sre-bot sre-bot merged commit 2da2351 into pingcap:release-3.0 Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/sql-infra SIG: SQL Infra status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug. type/3.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants