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

sysvars: error code package for sysvar.go #13366

Merged
merged 3 commits into from
Nov 12, 2019
Merged

Conversation

cfzjywxk
Copy link
Contributor

What problem does this PR solve?

Not all the errors in this file have error code. the error code added in parser is link

What is changed and how it works?

Add the missing ones and do some tiny refactorations

Check List

Tests

  • Unit test

Code changes

  • Has exported variable/fields change

Side effects

  • Breaking backward compatibility

Related changes

  • Need to update the documentation

Release note

  • Write release note for bug-fix or new feature.

@cfzjywxk cfzjywxk added the type/enhancement The issue or PR belongs to an enhancement. label Nov 11, 2019
@cfzjywxk cfzjywxk requested a review from a team as a code owner November 11, 2019 11:04
@ghost ghost requested review from qw4990 and wshwsh12 and removed request for a team November 11, 2019 11:04
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 added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 11, 2019
ErrMaxPreparedStmtCountReached = terror.ClassVariable.New(CodeMaxPreparedStmtCountReached, mysql.MySQLErrName[mysql.ErrMaxPreparedStmtCountReached])
ErrUnsupportedValueForVar = terror.ClassVariable.New(CodeUnknownStatusVar, "variable '%s' does not yet support value: %s")
ErrUnsupportedIsolationLevel = terror.ClassVariable.New(CodeUnknownStatusVar, "The isolation level '%s' is not supported. Set tidb_skip_isolation_level_check=1 to skip this error")
ErrUnsupportedValueForVar = terror.ClassVariable.New(mysql.ErrUnsupportedValueForVar, mysql.MySQLErrName[mysql.ErrUnsupportedValueForVar])
Copy link
Member

Choose a reason for hiding this comment

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

Please add some test cases for the code of these errors.

@codecov
Copy link

codecov bot commented Nov 12, 2019

Codecov Report

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

@@             Coverage Diff             @@
##             master     #13366   +/-   ##
===========================================
  Coverage   80.1903%   80.1903%           
===========================================
  Files           469        469           
  Lines        112612     112612           
===========================================
  Hits          90304      90304           
  Misses        15311      15311           
  Partials       6997       6997

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 added the status/can-merge Indicates a PR has been approved by a committer. label Nov 12, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 12, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Nov 12, 2019

@cfzjywxk merge failed.

@cfzjywxk
Copy link
Contributor Author

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Nov 12, 2019

Your auto merge job has been accepted, waiting for 12793

@sre-bot
Copy link
Contributor

sre-bot commented Nov 12, 2019

/run-all-tests

@sre-bot sre-bot merged commit 2dfaf55 into pingcap:master Nov 12, 2019
XiaTianliang pushed a commit to XiaTianliang/tidb that referenced this pull request Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants