summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r--sql/set_var.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index ff997158941..853f3570003 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -1092,9 +1092,10 @@ static void sys_default_init_slave(THD* thd, enum_var_type type)
static int sys_check_ftb_syntax(THD *thd, set_var *var)
{
- if (thd->master_access & SUPER_ACL)
- return ft_boolean_check_syntax_string((byte*) var->value->str_value.c_ptr()) ?
- -1 : 0;
+ if (thd->security_ctx->master_access & SUPER_ACL)
+ return (ft_boolean_check_syntax_string((byte*)
+ var->value->str_value.c_ptr()) ?
+ -1 : 0);
else
{
my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), "SUPER");
@@ -2689,7 +2690,7 @@ static bool set_option_autocommit(THD *thd, set_var *var)
static int check_log_update(THD *thd, set_var *var)
{
#ifndef NO_EMBEDDED_ACCESS_CHECKS
- if (!(thd->master_access & SUPER_ACL))
+ if (!(thd->security_ctx->master_access & SUPER_ACL))
{
my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), "SUPER");
return 1;
@@ -2735,7 +2736,7 @@ static int check_pseudo_thread_id(THD *thd, set_var *var)
{
var->save_result.ulonglong_value= var->value->val_int();
#ifndef NO_EMBEDDED_ACCESS_CHECKS
- if (thd->master_access & SUPER_ACL)
+ if (thd->security_ctx->master_access & SUPER_ACL)
return 0;
else
{
@@ -3100,10 +3101,10 @@ int set_var_password::check(THD *thd)
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if (!user->host.str)
{
- if (thd->priv_host != 0)
+ if (*thd->security_ctx->priv_host != 0)
{
- user->host.str= (char *) thd->priv_host;
- user->host.length= strlen(thd->priv_host);
+ user->host.str= (char *) thd->security_ctx->priv_host;
+ user->host.length= strlen(thd->security_ctx->priv_host);
}
else
{