1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Added the SET ROLE command to the grammar

This commit is contained in:
Vicențiu Ciorbaru
2013-10-17 15:11:29 -07:00
committed by Sergei Golubchik
parent 6062e87f54
commit 0254c9a4bd
2 changed files with 11 additions and 0 deletions

View File

@@ -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)},

View File

@@ -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;