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

mysql: add foreign key error #675

Merged
merged 2 commits into from
Dec 13, 2019
Merged

mysql: add foreign key error #675

merged 2 commits into from
Dec 13, 2019

Conversation

crazycs520
Copy link
Contributor

What problem does this PR solve?

Add error msg

@crazycs520 crazycs520 requested a review from a team December 12, 2019 11:55
@ghost ghost requested review from tangenta and removed request for a team December 12, 2019 11:55
mysql/errcode.go Outdated
@@ -939,6 +939,7 @@ const (
ErrSpatialFunctionalIndex = 3760
ErrWrongKeyColumnFunctionalIndex = 3761
ErrFunctionalIndexOnField = 3762
ErrReferencedForeignKey = 3780
Copy link
Contributor

Choose a reason for hiding this comment

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

According to the MySQL document,

Error number: 3780; Symbol: ER_FK_INCOMPATIBLE_COLUMNS; SQLSTATE: HY000
Message: Referencing column '%s' and referenced column '%s' in foreign key constraint '%s' are incompatible.

The error name should be ErrFKIncompatibleColumns.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

great, done.

Copy link
Contributor

@tangenta tangenta left a comment

Choose a reason for hiding this comment

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

LGTM

@tangenta tangenta added the status/LGT1 LGT1 label Dec 13, 2019
@codecov
Copy link

codecov bot commented Dec 13, 2019

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #675   +/-   ##
=======================================
  Coverage   80.13%   80.13%           
=======================================
  Files          33       33           
  Lines       13001    13001           
=======================================
  Hits        10418    10418           
  Misses       1964     1964           
  Partials      619      619

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12ed749...5e1ecef. Read the comment docs.

@tiancaiamao
Copy link
Collaborator

LGTM

@tiancaiamao tiancaiamao added status/LGT2 LGT2 and removed status/LGT1 LGT1 labels Dec 13, 2019
@kennytm
Copy link
Contributor

kennytm commented Dec 13, 2019

(CLA is borked)

@kennytm kennytm closed this Dec 13, 2019
@kennytm kennytm reopened this Dec 13, 2019
@kennytm kennytm merged commit f502c49 into pingcap:master Dec 13, 2019
@crazycs520 crazycs520 deleted the fk-err branch December 13, 2019 06:18
crazycs520 added a commit to crazycs520/parser that referenced this pull request Dec 18, 2019
crazycs520 added a commit to crazycs520/parser that referenced this pull request Dec 18, 2019
kennytm pushed a commit that referenced this pull request Dec 19, 2019
djshow832 pushed a commit that referenced this pull request Dec 20, 2019
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
* mysql: add foreign key error

* address comment
lyonzhi pushed a commit to lyonzhi/parser that referenced this pull request Apr 25, 2024
* mysql: add foreign key error

* address comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants