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

infoschema: fix load drop database schema bug and refine db-table api error. #11573

Merged
merged 5 commits into from
Aug 2, 2019

Conversation

crazycs520
Copy link
Contributor

@crazycs520 crazycs520 commented Aug 1, 2019

What problem does this PR solve?

  • Fix dirty table info in infoSchema.sortedTablesBuckets after drop database.
  • curl http://$IP:10080/db-table/{table_id} should return error when we cann't find the database info.
drop database if exists test;
create database if not exists test;
use test;
create table t1 (a int);
create table t2 (a int);  -- suppose table id of t2 is 48.  
create table t3 (a int);
drop database if exists test;
▶ curl "http://$IP:10080/db-table/48"
{
 "db_info": null,       # here is the problem. The `test` database was already droped.
 "table_info": {        # but we can still get the table t2 info.
  "id": 48,
  "name": {
   "O": "t2",
   "L": "t2"
  },
.
.
.

What is changed and how it works?

Fix bug of applyDropSchema function.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change

Side effects

Related changes

  • Need to cherry-pick to the release branch

@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #11573 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #11573   +/-   ##
===========================================
  Coverage   81.2163%   81.2163%           
===========================================
  Files           426        426           
  Lines         91846      91846           
===========================================
  Hits          74594      74594           
  Misses        11887      11887           
  Partials       5365       5365

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

@crazycs520 crazycs520 changed the title infoschema: fix load drop database schema bug infoschema: fix load drop database schema bug and refine db-table api error. Aug 1, 2019
@crazycs520
Copy link
Contributor Author

/run-all-tests

Copy link
Contributor

@winkyao winkyao left a comment

Choose a reason for hiding this comment

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

LGTM

@winkyao winkyao added status/LGT2 Indicates that a PR has LGTM 2. needs-cherry-pick-2.1 labels Aug 1, 2019
@winkyao winkyao added the priority/release-blocker This issue blocks a release. Please solve it ASAP. label Aug 2, 2019
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

@bb7133 bb7133 merged commit d2b5387 into pingcap:master Aug 2, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Aug 2, 2019

cherry pick to release-2.1 failed

@sre-bot
Copy link
Contributor

sre-bot commented Aug 2, 2019

cherry pick to release-3.0 failed

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/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants