1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-6625 SHOW GRANTS for current_user_name@wrong_host_name

This commit is contained in:
Sergei Golubchik
2014-08-21 21:25:22 +02:00
parent b5ebc21169
commit 57a43b8435
3 changed files with 12 additions and 2 deletions

View File

@ -4335,8 +4335,9 @@ end_with_restore_list:
if (!grant_user)
goto error;
if (grant_user->user.str &&
!strcmp(thd->security_ctx->priv_user, grant_user->user.str))
if (grant_user->user.str && grant_user->host.str &&
!strcmp(thd->security_ctx->priv_user, grant_user->user.str) &&
!strcmp(thd->security_ctx->priv_host, grant_user->host.str))
grant_user->user= current_user;
if (grant_user->user.str == current_user.str ||