-
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: check foreign key constraint when drop,modify,change column #14043
Conversation
Codecov Report
@@ Coverage Diff @@
## master #14043 +/- ##
===========================================
Coverage 80.2778% 80.2778%
===========================================
Files 483 483
Lines 121919 121919
===========================================
Hits 97874 97874
Misses 16287 16287
Partials 7758 7758 |
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.
Rest LGTM
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.
How about this, fristly,drop the constraint Foreign key in t.Meta().ForeignKeys
,and then execut "alter table t4 drop column d"
,it should be no err.
@reafans, Already add test for the case you said. |
/run-all-tests |
LGTM |
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
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
/run-all-tests |
cherry pick to release-2.1 failed |
cherry pick to release-3.0 failed |
What problem does this PR solve?
parser PR: pingcap/parser#675
Otherwise, select
information_schema.KEY_COLUMN_USAGE
will panic.What is changed and how it works?
Check List
Tests
Code changes
Side effects
Related changes
Release note