1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

cannot use lex->grant_user= &current_user, where LEX_USER current_user is a global constant,

because parser might modify the lex->user (e.g. set lex->user-password).
switch to use LEX_STRING current_user string, and also change other similar constants
to be LEX_STRING's for consistency.
This commit is contained in:
Sergei Golubchik
2013-10-18 08:17:56 -07:00
parent cdb5510204
commit 06e16b8c97
8 changed files with 67 additions and 67 deletions

View File

@ -841,12 +841,9 @@ int set_var_password::check(THD *thd)
user->host.length= strlen(thd->security_ctx->priv_host);
}
else
{
user->host.str= (char *)"%";
user->host.length= 1;
}
user->host= host_not_specified;
}
if (!user->user.str)
if (user->user.str == current_user.str)
{
DBUG_ASSERT(thd->security_ctx->user);
user->user.str= (char *) thd->security_ctx->user;