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 create table with like bug when refer table has non-public column/index #9580

Merged
merged 14 commits into from
Mar 11, 2019

Conversation

crazycs520
Copy link
Contributor

What problem does this PR solve?

Create table with like will copy refer table directly, It will have problem when refer table have a non-public column or index( may cause by add/drop column/index ). That will cause the new create table will have a column/index always in non-public, this may cause some problem. See jira issue#3190.

What is changed and how it works?

Check non-public column and index when create table with like.

Check List

Tests

  • Integration test

Code changes

  • Has exported function/method change

Side effects

Related changes

@codecov-io
Copy link

codecov-io commented Mar 6, 2019

Codecov Report

Merging #9580 into master will increase coverage by 0.0053%.
The diff coverage is 100%.

@@               Coverage Diff               @@
##             master     #9580        +/-   ##
===============================================
+ Coverage   67.4097%   67.415%   +0.0053%     
===============================================
  Files           376       376                
  Lines         79180     79190        +10     
===============================================
+ Hits          53375     53386        +11     
+ Misses        21034     21032         -2     
- Partials       4771      4772         +1

@crazycs520
Copy link
Contributor Author

/run-all-tests

1 similar comment
@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.

reset LGTM

ddl/ddl_api.go Outdated Show resolved Hide resolved
ddl/table_test.go Outdated Show resolved Hide resolved
ddl/ddl_api.go Outdated Show resolved Hide resolved
ddl/ddl_api.go Outdated Show resolved Hide resolved
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

@crazycs520
Copy link
Contributor Author

/run-all-tests

ddl/db_test.go Outdated Show resolved Hide resolved
ddl/db_test.go Outdated Show resolved Hide resolved
ddl/db_test.go Show resolved Hide resolved
@zimulala zimulala added the status/LGT1 Indicates that a PR has LGTM 1. label Mar 8, 2019
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 status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Mar 11, 2019
Copy link
Contributor

@xiekeyi98 xiekeyi98 left a comment

Choose a reason for hiding this comment

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

LGTM

@xiekeyi98 xiekeyi98 added status/LGT3 The PR has already had 3 LGTM. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Mar 11, 2019
@crazycs520
Copy link
Contributor Author

/run-all-tests

@winkyao winkyao merged commit 6e085be into pingcap:master Mar 11, 2019
@winkyao
Copy link
Contributor

winkyao commented Mar 11, 2019

Please cherry-pick to 2.1, 2.0

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/LGT3 The PR has already had 3 LGTM. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants