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

add error code from planner, expression and executor #650

Merged
merged 5 commits into from
Nov 27, 2019

Conversation

ichn-hu
Copy link
Contributor

@ichn-hu ichn-hu commented Nov 26, 2019

What problem does this PR solve?

Associating internal error code for planner/core/errors.go, expression/errors.go and executor/errors.go to parser/mysql/errcode.go.

What is changed and how it works?

Adding more error code and set up the mapping.

Check List

Tests

  • No code

Code changes

Side effects

Related changes

@ichn-hu ichn-hu requested review from jackysp, imtbkcat and a team November 26, 2019 05:27
@ghost ghost requested review from kennytm and removed request for a team November 26, 2019 05:27
@ichn-hu ichn-hu added the type/enhancement New feature or request label Nov 26, 2019
@codecov
Copy link

codecov bot commented Nov 26, 2019

Codecov Report

Merging #650 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #650      +/-   ##
=========================================
- Coverage   80.01%     80%   -0.02%     
=========================================
  Files          32      32              
  Lines       12703   12696       -7     
=========================================
- Hits        10164   10157       -7     
  Misses       1935    1935              
  Partials      604     604
Impacted Files Coverage Δ
parser.go 92.94% <0%> (-0.02%) ⬇️

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 22c9e3f...8bfaf16. Read the comment docs.

mysql/errcode.go Outdated
ErrColumnStateCantNone = 8046
ErrUnsupportedValueForVar = 8047
ErrUnsupportedIsolationLevel = 8048
ErrUnsupportedType = 8049
Copy link
Member

Choose a reason for hiding this comment

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

It is better to start from 8100 to avoid some conflicts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, will do

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jackysp but it seems starting from 8100 has already been taken

	ErrInvalidPluginID             = 8101
	ErrInvalidPluginManifest       = 8102
	ErrInvalidPluginName           = 8103
	ErrInvalidPluginVersion        = 8104
	ErrDuplicatePlugin             = 8105
	ErrInvalidPluginSysVarName     = 8106
	ErrRequireVersionCheckFail     = 8107

So do we want to start from 8108 or 8200?

@ichn-hu
Copy link
Contributor Author

ichn-hu commented Nov 26, 2019

@tangenta @jackysp PTAL again.

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 Nov 26, 2019
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

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

LGTM

@jackysp jackysp merged commit 37cd7d6 into pingcap:master Nov 27, 2019
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
lyonzhi pushed a commit to lyonzhi/parser that referenced this pull request Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 LGT1 type/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants