diff options
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r-- | sql/sql_acl.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index adc073f7117..879316f1da3 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1871,7 +1871,9 @@ int acl_check_setrole(THD *thd, char *rolename, ulonglong *access) continue; acl_user= (ACL_USER *)acl_user_base; - if (acl_user->wild_eq(thd->security_ctx->user, thd->security_ctx->host)) + /* Yes! priv_user@host. Don't ask why - that's what check_access() does. */ + if (acl_user->wild_eq(thd->security_ctx->priv_user, + thd->security_ctx->host)) { is_granted= TRUE; break; |