summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shulga <dmitry.shulga@mariadb.com>2021-06-10 01:00:31 +0700
committerSergei Golubchik <serg@mariadb.org>2021-06-17 19:30:24 +0200
commit994e3f40b5588a044dcebeb20f3e8a217c3bad79 (patch)
tree0889ef66e93cabb2c29d66b0b00673ab97d83dfd
parentccb0504fb02a5896455f6feb2b73a09d2d509f94 (diff)
downloadmariadb-git-994e3f40b5588a044dcebeb20f3e8a217c3bad79.tar.gz
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
-rw-r--r--sql/set_var.cc6
1 files 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;