MDEV-16708: fixed incorrect issuing the error

' Access denied; you need (at least one of) the SUPER privilege(s) for this operation
on executing SET system_variable=.... in PS mode
This commit is contained in:
Dmitry Shulga 2021-06-10 01:00:31 +07:00 committed by Sergei Golubchik
parent ccb0504fb0
commit 994e3f40b5

View File

@ -836,9 +836,9 @@ int set_var::light_check(THD *thd)
my_error(err, MYF(0), var->name.str);
return -1;
}
if (type == OPT_GLOBAL &&
check_global_access(thd, PRIV_SET_GLOBAL_SYSTEM_VARIABLE))
return 1;
if (type == OPT_GLOBAL && var->on_check_access_global(thd))
return 1;
if (value && value->fix_fields_if_needed_for_scalar(thd, &value))
return -1;