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

*: fix error message of access denied #17449

Merged
merged 4 commits into from
Jun 5, 2020
Merged

Conversation

imtbkcat
Copy link

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:

What is changed and how it works?

fix error message when privilege is not enough to access table or database.

MySQL [(none)]> select * from test.t;
ERROR 1142 (42000): SELECT command denied to user 'u1'@'127.0.0.1' for table 't'
MySQL [(none)]> create table test.t (x int);
ERROR 1142 (42000): CREATE command denied to user '127.0.0.1'@'u1' for table 't'
MySQL [(none)]> create table test.t (x int);

What's Changed:

Some of error message were produced in an incorrect way, which reverse AuthHostname and AuthUsername. Some of them use Hostname rather than AuthHostname.

How it Works:

fix them all.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Side effects

  • None

Release note

  • fix error message when access denied.

@imtbkcat imtbkcat requested a review from a team as a code owner May 27, 2020 06:57
@ghost ghost requested review from lzmhhh123 and removed request for a team May 27, 2020 06:57
@imtbkcat imtbkcat changed the title fix error message of access denie *: fix error message of access denied May 27, 2020
@github-actions github-actions bot added the sig/sql-infra SIG: SQL Infra label May 27, 2020
@codecov
Copy link

codecov bot commented May 27, 2020

Codecov Report

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

@@             Coverage Diff             @@
##             master     #17449   +/-   ##
===========================================
  Coverage   79.6164%   79.6164%           
===========================================
  Files           524        524           
  Lines        142350     142350           
===========================================
  Hits         113334     113334           
  Misses        19931      19931           
  Partials       9085       9085           

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/LGT1 Indicates that a PR has LGTM 1. label May 27, 2020
@jackysp
Copy link
Member

jackysp commented Jun 1, 2020

PTAL @tiancaiamao

@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao tiancaiamao added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jun 3, 2020
@tiancaiamao
Copy link
Contributor

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jun 3, 2020
@sre-bot
Copy link
Contributor

sre-bot commented Jun 3, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented Jun 3, 2020

@imtbkcat merge failed.

@imtbkcat
Copy link
Author

imtbkcat commented Jun 5, 2020

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

@imtbkcat
Copy link
Author

imtbkcat commented Jun 5, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Jun 5, 2020

Sorry @imtbkcat, you don't have permission to trigger auto merge event on this branch. You are not a committer for this part

@imtbkcat imtbkcat added sig/transaction SIG:Transaction and removed sig/sql-infra SIG: SQL Infra labels Jun 5, 2020
@imtbkcat
Copy link
Author

imtbkcat commented Jun 5, 2020

/merge

@sre-bot
Copy link
Contributor

sre-bot commented Jun 5, 2020

/run-all-tests

@tiancaiamao
Copy link
Contributor

/merge

@github-actions github-actions bot added the sig/sql-infra SIG: SQL Infra label Jun 5, 2020
@imtbkcat imtbkcat removed the sig/transaction SIG:Transaction label Jun 5, 2020
@sre-bot sre-bot merged commit 5f59f01 into pingcap:master Jun 5, 2020
sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Jun 5, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Jun 5, 2020

cherry pick to release-3.0 in PR #17722

sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Jun 5, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Jun 5, 2020

cherry pick to release-3.1 in PR #17723

sre-bot pushed a commit to sre-bot/tidb that referenced this pull request Jun 5, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented Jun 5, 2020

cherry pick to release-4.0 in PR #17724

sre-bot added a commit that referenced this pull request Jun 8, 2020
* cherry pick #17449 to release-3.1

Signed-off-by: sre-bot <sre-bot@pingcap.com>

* fix conflict

Co-authored-by: Lingyu Song <songlingyu@pingcap.com>
jackysp pushed a commit that referenced this pull request Jun 11, 2020
sre-bot added a commit that referenced this pull request Jun 11, 2020
* cherry pick #17449 to release-3.0

Signed-off-by: sre-bot <sre-bot@pingcap.com>

* fix conflict

Co-authored-by: Lingyu Song <songlingyu@pingcap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/sql-infra SIG: SQL Infra status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug. type/usability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants