-
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: Support the operation of dropping multi-indexes in one statement #20457
ddl: Support the operation of dropping multi-indexes in one statement #20457
Conversation
Please follow PR Title Format:
Or if the count of mainly changed packages are more than 3, use
|
No release note, Please follow https://github.com/pingcap/community/blob/master/contributors/release-note-checker.md |
@ou-bing, please update your pull request. |
1 similar comment
@ou-bing, please update your pull request. |
@ou-bing PR closed due to no update for a long time. Feel free to reopen it anytime. |
Please fix conflicts. Are there warnings related tests? |
There are some related tests in |
ddl/ddl_api.go
Outdated
@@ -2432,6 +2441,14 @@ func (d *ddl) AlterTable(ctx context.Context, sctx sessionctx.Context, ident ast | |||
if !sctx.GetSessionVars().EnableChangeMultiSchema { | |||
return errRunMultiSchemaChanges | |||
} | |||
|
|||
if isDropIndexes(validSpecs) { | |||
if err = d.DropIndexes(sctx, ident, validSpecs); err != nil { |
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.
I think we'd better put it to line 2457, and add a "ActionDropIndexes" case.
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.
I modified the isSameTypeMultiSpecs
function and add some test cases for drop both primary key and index.
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
/merge |
This pull request has been accepted and is ready to merge. Commit hash: f96b07b
|
What problem does this PR solve?
Issue Number: close Support the operation of dropping multi-indexes in one statement #14765
Support to delete primary key and index in one statement.
Problem Summary:
What is changed and how it works?
Proposal: xxx
Support add multi-columns :
Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Release note