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

Conversation

Projects
None yet
4 participants
@morgo
Member

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

executor: privilege check USE command
improves mysql compatibility
@morgo

This comment has been minimized.

Member

morgo commented Nov 22, 2018

/run-all-tests

@morgo

This comment has been minimized.

Member

morgo commented Nov 22, 2018

/run-unit-test

@zz-jason

This comment has been minimized.

Member

zz-jason commented Nov 26, 2018

morgo added some commits Nov 26, 2018

@tiancaiamao

This comment has been minimized.

Contributor

tiancaiamao commented Nov 27, 2018

LGTM

@tiancaiamao

This comment has been minimized.

Contributor

tiancaiamao commented Nov 27, 2018

/run-all-tests

@tiancaiamao tiancaiamao added status/LGT2 and removed status/LGT1 labels Nov 27, 2018

@zz-jason zz-jason merged commit 73c9173 into pingcap:master Nov 27, 2018

4 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci-tidb/build Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@morgo morgo deleted the morgo:use-db branch Nov 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment