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

executor: privilege check USE command #8418

Merged
merged 7 commits into from
Nov 27, 2018
Merged

executor: privilege check USE command #8418

merged 7 commits into from
Nov 27, 2018

Conversation

morgo
Copy link
Contributor

@morgo morgo commented Nov 22, 2018

What problem does this PR solve?

In MySQL, a use DB will return a privilege error for users who would not have access to the DB irrespective on whether it exists.

This PR changes TiDB to behave similarly and not leak that a schema exists.

What is changed and how it works?

The use DB (and protocol commands that are similar) now may return an error.

Check List

Tests

  • Unit test
  • Manual test (add detailed scripts or steps below)

Code changes

  • minimal

Side effects

  • Breaking backward compatibility for broken clients

Related changes

  • Need to be included in the release note

This change is Reviewable

improves mysql compatibility
@morgo
Copy link
Contributor Author

morgo commented Nov 22, 2018

/run-all-tests

@morgo
Copy link
Contributor Author

morgo commented Nov 22, 2018

/run-unit-test

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason
Copy link
Member

@tiancaiamao @lysu @winkyao PTAL

@zz-jason zz-jason added status/LGT1 Indicates that a PR has LGTM 1. sig/execution SIG execution labels Nov 26, 2018
@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao
Copy link
Contributor

/run-all-tests

@tiancaiamao tiancaiamao added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Nov 27, 2018
@zz-jason zz-jason merged commit 73c9173 into pingcap:master Nov 27, 2018
@morgo morgo deleted the use-db branch November 27, 2018 12:25
@sre-bot sre-bot added the contribution This PR is from a community contributor. label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor. sig/execution SIG execution status/LGT2 Indicates that a PR has LGTM 2. type/compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants