mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
cannot use lex->grant_user= ¤t_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:
@ -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;
|
||||
|
Reference in New Issue
Block a user