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

planner/core: raise 'No database selected' error for grant statement #13745

Merged
merged 6 commits into from Nov 27, 2019

Conversation

@tiancaiamao
Copy link
Contributor

tiancaiamao commented Nov 26, 2019

What problem does this PR solve?

MySQL:

mysql> grant select on test1111 to test@"%" ;
ERROR 1046 (3D000): No database selected

TiDB:

mysql> grant select on test1111 to test@"%" ;
Query OK, 0 rows affected (0.05 sec)

What is changed and how it works?

If no database is selected, grant privilege to table should raise an error.

Check List

Tests

  • Unit test
@codecov

This comment has been minimized.

Copy link

codecov bot commented Nov 26, 2019

Codecov Report

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

@@             Coverage Diff             @@
##             master     #13745   +/-   ##
===========================================
  Coverage   80.2474%   80.2474%           
===========================================
  Files           474        474           
  Lines        117048     117048           
===========================================
  Hits          93928      93928           
  Misses        15758      15758           
  Partials       7362       7362
@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

tiancaiamao commented Nov 26, 2019

Copy link
Contributor

imtbkcat left a comment

LGTM

@lysu
lysu approved these changes Nov 26, 2019
Copy link
Member

lysu left a comment

LGTM

@sre-bot

This comment has been minimized.

Copy link

sre-bot commented Nov 26, 2019

Your auto merge job has been accepted, waiting for 13300

@zz-jason

This comment has been minimized.

Copy link
Member

zz-jason commented Nov 26, 2019

@tiancaiamao should we cherry pick this PR to release 3.0 and release 3.1?

@sre-bot

This comment has been minimized.

Copy link

sre-bot commented Nov 26, 2019

/run-all-tests

@sre-bot

This comment has been minimized.

Copy link

sre-bot commented Nov 26, 2019

@tiancaiamao merge failed.

ngaut and others added 3 commits Nov 27, 2019
@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

tiancaiamao commented Nov 27, 2019

/run-all-tests

@tiancaiamao

This comment has been minimized.

Copy link
Contributor Author

tiancaiamao commented Nov 27, 2019

/run-all-tests

@tiancaiamao tiancaiamao merged commit 1c59a53 into pingcap:master Nov 27, 2019
14 checks passed
14 checks passed
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/build_check_race Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev_2 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/common-test job succeeded
Details
idc-jenkins-ci-tidb/integration-common-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-compatibility-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-copr-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/integration-ddl-test Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/mybatis-test job succeeded
Details
idc-jenkins-ci-tidb/sqllogic-test-1 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/sqllogic-test-2 Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/unit-test Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details
@tiancaiamao tiancaiamao deleted the tiancaiamao:grant-no-db-select branch Nov 27, 2019
@sre-bot

This comment has been minimized.

Copy link

sre-bot commented Nov 27, 2019

cherry pick to release-3.0 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.