From 994e3f40b5588a044dcebeb20f3e8a217c3bad79 Mon Sep 17 00:00:00 2001 From: Dmitry Shulga Date: Thu, 10 Jun 2021 01:00:31 +0700 Subject: [PATCH] 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 --- sql/set_var.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/set_var.cc b/sql/set_var.cc index 724225f1058..f03152ace03 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -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;