Commit 6062e87f authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru Committed by Sergei Golubchik

Created new set_var_role class to handle the SET ROLE command

parent 7ec24435
...@@ -871,6 +871,25 @@ int set_var_password::update(THD *thd) ...@@ -871,6 +871,25 @@ int set_var_password::update(THD *thd)
#endif #endif
} }
/*****************************************************************************
Functions to handle SET ROLE
*****************************************************************************/
int set_var_role::check(THD *thd)
{
/* nothing to check */
return 0;
}
int set_var_role::update(THD *thd)
{
#ifndef NO_EMBEDDED_ACCESS_CHECKS
return acl_setrole(thd, this->role.str);
#else
return 0;
#endif
}
/***************************************************************************** /*****************************************************************************
Functions to handle SET NAMES and SET CHARACTER SET Functions to handle SET NAMES and SET CHARACTER SET
*****************************************************************************/ *****************************************************************************/
......
...@@ -276,6 +276,17 @@ public: ...@@ -276,6 +276,17 @@ public:
int update(THD *thd); int update(THD *thd);
}; };
/* For SET ROLE */
class set_var_role: public set_var_base
{
LEX_STRING role;
public:
set_var_role(LEX_STRING role_arg) : role(role_arg) {};
int check(THD *thd);
int update(THD *thd);
};
/* For SET NAMES and SET CHARACTER SET */ /* For SET NAMES and SET CHARACTER SET */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment