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) #16010

Merged
merged 3 commits into from
Apr 15, 2020

Conversation

sre-bot
Copy link
Contributor

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

cherry-pick #15861 to release-4.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
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 3, 2020
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 Apr 8, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 8, 2020

Your auto merge job has been accepted, waiting for 16116, 16115

@zimulala zimulala added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Apr 8, 2020
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 8, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 8, 2020

@sre-bot merge failed.

@tiancaiamao
Copy link
Contributor

@crazycs520

@zz-jason
Copy link
Member

/merge

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 15, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 15, 2020

@sre-bot merge failed.

@zz-jason zz-jason merged commit d698689 into pingcap:release-4.0 Apr 15, 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/LGT2 Indicates that a PR has LGTM 2. 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.

5 participants