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

infoschema: refine error code for package infoschema #13646

Merged
merged 15 commits into from
Nov 26, 2019

Conversation

Deardrops
Copy link
Contributor

@Deardrops Deardrops commented Nov 21, 2019

What problem does this PR solve?

Not all the errors in infoschema package have error code.

Make some errors related to CREATE USER / ALTER USER / DROP USER statement compatibly with MySQL 5.7, e.g.

mysql> warnings;
Show warnings enabled.

mysql> create user if not exists 'newuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> create user if not exists 'newuser'@'localhost';
Query OK, 0 rows affected, 1 warning (0.00 sec)

Note (Code 3163): User 'newuser'@'localhost' already exists.
mysql> create user 'newuser'@'localhost';
ERROR 1396 (HY000): Operation CREATE USER failed for 'newuser'@'localhost'

What is changed and how it works?

Add them, related PR pingcap/parser#644

Check List

Tests

  • Integration test

Code changes

  • Has exported variable/fields change

Side effects

  • None

Related changes

  • None

Release note

  • None

@Deardrops Deardrops added type/enhancement The issue or PR belongs to an enhancement. status/PTAL labels Nov 21, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 21, 2019

Thanks for your PR.
This PR will be closed by bot because you already had 3 opened PRs, close or merge them before submitting a new one.
#12550 , #13168 , #13637

@sre-bot sre-bot closed this Nov 21, 2019
@Deardrops Deardrops reopened this Nov 21, 2019
@Deardrops Deardrops marked this pull request as ready for review November 21, 2019 06:22
@sre-bot
Copy link
Contributor

sre-bot commented Nov 21, 2019

Thanks for your PR.
This PR will be closed by bot because you already had 3 opened PRs, close or merge them before submitting a new one.
#13486 , #13637 , #13654

@sre-bot sre-bot closed this Nov 21, 2019
@Deardrops Deardrops reopened this Nov 21, 2019
@Deardrops
Copy link
Contributor Author

/run-common-test tidb-test=pr/954

@Deardrops
Copy link
Contributor Author

/run-integration-common-test tidb-test=pr/954

executor/simple_test.go Outdated Show resolved Hide resolved
executor/simple.go Outdated Show resolved Hide resolved
executor/simple.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Nov 21, 2019

Codecov Report

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

@@             Coverage Diff             @@
##             master     #13646   +/-   ##
===========================================
  Coverage   80.1239%   80.1239%           
===========================================
  Files           473        473           
  Lines        116512     116512           
===========================================
  Hits          93354      93354           
  Misses        15819      15819           
  Partials       7339       7339

@bb7133 bb7133 added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 22, 2019
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

@Deardrops
Copy link
Contributor Author

/run-all-tests tidb-test=pr/954

@sre-bot
Copy link
Contributor

sre-bot commented Nov 24, 2019

@bb7133, PTAL.

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 25, 2019
@sre-bot
Copy link
Contributor

sre-bot commented Nov 25, 2019

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Nov 25, 2019

@Deardrops merge failed.

@jackysp
Copy link
Member

jackysp commented Nov 25, 2019

@Deardrops merge failed, PTAL

@Deardrops
Copy link
Contributor Author

/run-all-tests tidb-test=pr/954

@Deardrops Deardrops added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 26, 2019
@Deardrops
Copy link
Contributor Author

/run-unit-test

@Deardrops Deardrops merged commit acfc7be into pingcap:master Nov 26, 2019
@Deardrops Deardrops deleted the fix-infoschema-errcode branch November 26, 2019 02:21
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/LGT2 Indicates that a PR has LGTM 2. type/compatibility type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants