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

tidb/privilege/privileges: make show databases available with any global privilege #3666

Merged
merged 4 commits into from
Jul 8, 2017

Conversation

tiancaiamao
Copy link
Contributor

For issue #3656
In the old code, show databases returns non-empty result when the user has ShowDBPriv,
now it's change to any global privilege.

Ref: https://dev.mysql.com/doc/refman/5.7/en/show-databases.html
The actual behavior is not the same as it says:

You see only those databases for which you have some kind of privilege, unless you have the global SHOW DATABASES privilege.

@zimulala @hanfei1991 @shenli @XuHuaiyu

@hanfei1991
Copy link
Member

LGTM

@hanfei1991 hanfei1991 added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 8, 2017
jackysp
jackysp previously approved these changes Jul 8, 2017
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

@zimulala
Copy link
Contributor

zimulala commented Jul 8, 2017

Add a test about grant Create'? The issue case uses grant Create`.

@zimulala zimulala added DNM and removed DNM labels Jul 8, 2017
@zimulala
Copy link
Contributor

zimulala commented Jul 8, 2017

LGTM

@zimulala zimulala added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 8, 2017
@zimulala zimulala merged commit c04bc3d into master Jul 8, 2017
@zimulala zimulala deleted the tiancaiamao/show-databases branch July 8, 2017 14:49
tiancaiamao added a commit that referenced this pull request Jul 13, 2017
…bal privilege (#3666)

* tidb/privilege/privileges: make show databases available with any global privilege
tiancaiamao added a commit that referenced this pull request Jul 13, 2017
* expression, executor: fix hex(binary) (#3567)

* expression, executor: fix unhex(binary) error (#3569)

* expression: builtin now() should consider timestamp variable (#3590)

* tidb/privilege/privileges: make show databases available with any global privilege (#3666)

* privilege/privileges: skip privilege check for information_schema database (#3675)

* conn: fix database info leaking problem (#3699)

* server: escape database name "use `xxx`" in OpenCtx (#3713)

* executor: fix explicitly insert null value into timestamp column (#3646)

* util/types: fix parsing datatime 00-00-00 (#3536)

* tidb-server: fix incorrect error message when auth failed (#3696)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants