summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 3dc370b7b63..689b14caac9 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -2849,8 +2849,6 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
VOID(pthread_mutex_lock(&acl_cache->lock));
/* Add first global access grants */
- if (acl_user->access || acl_user->password ||
- acl_user->ssl_type != SSL_TYPE_NONE)
{
want_access=acl_user->access;
String global(buff,sizeof(buff),&my_charset_latin1);
@@ -2983,6 +2981,8 @@ int mysql_show_grants(THD *thd,LEX_USER *lex_user)
if (test_all_bits(want_access,(DB_ACLS & ~GRANT_ACL)))
db.append("ALL PRIVILEGES",14);
+ else if (!(want_access & ~GRANT_ACL))
+ db.append("USAGE",5);
else
{
int found=0, cnt;