Commit 0254c9a4 authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru Committed by Sergei Golubchik

Added the SET ROLE command to the grammar

parent 6062e87f
......@@ -489,6 +489,7 @@ static SYMBOL symbols[] = {
{ "REVOKE", SYM(REVOKE)},
{ "RIGHT", SYM(RIGHT)},
{ "RLIKE", SYM(REGEXP)}, /* Like in mSQL2 */
{ "ROLE", SYM(ROLE_SYM)},
{ "ROLLBACK", SYM(ROLLBACK_SYM)},
{ "ROLLUP", SYM(ROLLUP_SYM)},
{ "ROUTINE", SYM(ROUTINE_SYM)},
......
......@@ -1260,6 +1260,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%token RETURN_SYM /* SQL-2003-R */
%token REVOKE /* SQL-2003-R */
%token RIGHT /* SQL-2003-R */
%token ROLE_SYM
%token ROLLBACK_SYM /* SQL-2003-R */
%token ROLLUP_SYM /* SQL-2003-R */
%token ROUTINE_SYM /* SQL-2003-N */
......@@ -1687,6 +1688,8 @@ END_OF_INPUT
%type <is_not_empty> opt_union_order_or_limit
%type <NONE> ROLE_SYM
%%
......@@ -13490,6 +13493,7 @@ keyword_sp:
| RESOURCES {}
| RESUME_SYM {}
| RETURNS_SYM {}
| ROLE_SYM {}
| ROLLUP_SYM {}
| ROUTINE_SYM {}
| ROWS_SYM {}
......@@ -13839,6 +13843,12 @@ option_value:
MYSQL_YYABORT;
lex->var_list.push_back(var);
}
| ROLE_SYM ident_or_text
{
LEX *lex = Lex;
set_var_role *var= new set_var_role($2);
lex->var_list.push_back(var);
}
| PASSWORD equal text_or_password
{
LEX *lex= thd->lex;
......
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