mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.11 into 11.0
This commit is contained in:
@ -3390,10 +3390,18 @@ end:
|
||||
check_role_is_granted_callback,
|
||||
NULL) == -1))
|
||||
{
|
||||
/* Role is not granted but current user can see the role */
|
||||
my_printf_error(ER_INVALID_ROLE, "User %`s@%`s has not been granted role %`s",
|
||||
MYF(0), thd->security_ctx->priv_user,
|
||||
thd->security_ctx->priv_host, rolename);
|
||||
/* This happens for SET ROLE case and when `--skip-name-resolve` option
|
||||
is used. In that situation host can be NULL and current user is always
|
||||
target user, so printing `priv_user@priv_host` is not incorrect.
|
||||
*/
|
||||
if (!host)
|
||||
my_printf_error(ER_INVALID_ROLE, "User %`s@%`s has not been granted role %`s",
|
||||
MYF(0), thd->security_ctx->priv_user,
|
||||
thd->security_ctx->priv_host, rolename);
|
||||
else
|
||||
/* Role is not granted but current user can see the role */
|
||||
my_printf_error(ER_INVALID_ROLE, "User %`s@%`s has not been granted role %`s",
|
||||
MYF(0), user, host, rolename);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user