ddl: fix cancel drop table/database ddl job bug.#8537
Merged
ciscoxll merged 21 commits intopingcap:masterfrom Dec 26, 2018
Merged
ddl: fix cancel drop table/database ddl job bug.#8537ciscoxll merged 21 commits intopingcap:masterfrom
ciscoxll merged 21 commits intopingcap:masterfrom
Conversation
f375884 to
d9b631e
Compare
Contributor
Author
|
/run-all-tests |
ciscoxll
reviewed
Dec 5, 2018
ciscoxll
reviewed
Dec 5, 2018
crazycs520
commented
Dec 5, 2018
ciscoxll
reviewed
Dec 6, 2018
ciscoxll
reviewed
Dec 6, 2018
winkyao
reviewed
Dec 6, 2018
Contributor
|
@zimulala PTAL |
zimulala
reviewed
Dec 6, 2018
crazycs520
commented
Dec 7, 2018
ciscoxll
reviewed
Dec 7, 2018
Contributor
ciscoxll
left a comment
There was a problem hiding this comment.
Please solve the CI error.
87fa7bf to
09fe09d
Compare
zimulala
reviewed
Dec 24, 2018
Contributor
Author
|
/run-all-tests |
ciscoxll
reviewed
Dec 24, 2018
Contributor
|
/run-all-tests |
Contributor
Author
|
/run-unit-test |
Contributor
Author
|
/run-unit-test |
2 similar comments
Contributor
Author
|
/run-unit-test |
Contributor
Author
|
/run-unit-test |
Contributor
Author
|
/rebuild |
yu34po
pushed a commit
to yu34po/tidb
that referenced
this pull request
Jan 2, 2019
* ddl: fix cancel drop table bugs
crazycs520
added a commit
to crazycs520/tidb
that referenced
this pull request
Feb 28, 2019
* ddl: fix cancel drop table bugs
zz-jason
pushed a commit
that referenced
this pull request
Feb 28, 2019
crazycs520
added a commit
to crazycs520/tidb
that referenced
this pull request
Mar 1, 2019
* ddl: fix cancel drop table bugs
zimulala
pushed a commit
that referenced
this pull request
Mar 7, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
related same PR #8171.
This PR fix cancel drop table/database ddl job.
The droped table/database info state is change as follows:
public -> write only -> delete only -> none.
Currently, If we cancel drop table/database ddl in
write onlyanddelete only, TiDBinfoschemawill delete the table and when we operate the corresponding table/database, TiDB will return error: xxx not exist. But if we create table/database with the same name will return err: xxx already exists.This PR fix above problem, if successfully cancel the drop table/database ddl, we should make TiDB infoschema to reload the table/database.
What is changed and how it works?
Only allow cancel drop database/table before the job first run.
Cancel create table/database will be ok in currentlly, and this pr also add test for this.
Check List
Tests
Code changes
Has exported function/method change
Side effects
Increased code complexity
Related changes
This change is