Skip to content

Commit 0ed291e

Browse files
committed
cleanup: parser: s/USER/USER_SYM/
1 parent 0bef3bb commit 0ed291e

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

sql/lex.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ static SYMBOL symbols[] = {
646646
{ "UPGRADE", SYM(UPGRADE_SYM)},
647647
{ "USAGE", SYM(USAGE)},
648648
{ "USE", SYM(USE_SYM)},
649-
{ "USER", SYM(USER)},
649+
{ "USER", SYM(USER_SYM)},
650650
{ "USER_RESOURCES", SYM(RESOURCES)},
651651
{ "USE_FRM", SYM(USE_FRM)},
652652
{ "USING", SYM(USING)},
@@ -714,7 +714,7 @@ static SYMBOL sql_functions[] = {
714714
{ "PERCENT_RANK", SYM(PERCENT_RANK_SYM)},
715715
{ "RANK", SYM(RANK_SYM)},
716716
{ "ROW_NUMBER", SYM(ROW_NUMBER_SYM)},
717-
{ "SESSION_USER", SYM(USER)},
717+
{ "SESSION_USER", SYM(USER_SYM)},
718718
{ "STD", SYM(STD_SYM)},
719719
{ "STDDEV", SYM(STD_SYM)},
720720
{ "STDDEV_POP", SYM(STD_SYM)},
@@ -724,7 +724,7 @@ static SYMBOL sql_functions[] = {
724724
{ "SUBSTRING", SYM(SUBSTRING)},
725725
{ "SUM", SYM(SUM_SYM)},
726726
{ "SYSDATE", SYM(SYSDATE)},
727-
{ "SYSTEM_USER", SYM(USER)},
727+
{ "SYSTEM_USER", SYM(USER_SYM)},
728728
{ "TRIM", SYM(TRIM)},
729729
{ "VARIANCE", SYM(VARIANCE_SYM)},
730730
{ "VAR_POP", SYM(VARIANCE_SYM)},

sql/sql_yacc.yy

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,7 +1683,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
16831683
%token UPDATE_SYM /* SQL-2003-R */
16841684
%token UPGRADE_SYM
16851685
%token USAGE /* SQL-2003-N */
1686-
%token USER /* SQL-2003-R */
1686+
%token USER_SYM /* SQL-2003-R */
16871687
%token USE_FRM
16881688
%token USE_SYM
16891689
%token USING /* SQL-2003-R */
@@ -2632,7 +2632,7 @@ create:
26322632
Lex->create_view_suid= TRUE;
26332633
}
26342634
view_or_trigger_or_sp_or_event { }
2635-
| create_or_replace USER opt_if_not_exists clear_privileges grant_list
2635+
| create_or_replace USER_SYM opt_if_not_exists clear_privileges grant_list
26362636
opt_require_clause opt_resource_options
26372637
{
26382638
if (Lex->set_command_with_check(SQLCOM_CREATE_USER, $1 | $3))
@@ -2675,7 +2675,7 @@ server_options_list:
26752675
;
26762676

26772677
server_option:
2678-
USER TEXT_STRING_sys
2678+
USER_SYM TEXT_STRING_sys
26792679
{
26802680
MYSQL_YYABORT_UNLESS(Lex->server_options.username.str == 0);
26812681
Lex->server_options.username= $2;
@@ -7289,7 +7289,7 @@ alter:
72897289
lex->server_options.reset($3);
72907290
} OPTIONS_SYM '(' server_options_list ')' { }
72917291
/* ALTER USER foo is allowed for MySQL compatibility. */
7292-
| ALTER opt_if_exists USER clear_privileges grant_list
7292+
| ALTER opt_if_exists USER_SYM clear_privileges grant_list
72937293
opt_require_clause opt_resource_options
72947294
{
72957295
Lex->create_info.set($2);
@@ -8242,7 +8242,7 @@ rename:
82428242
}
82438243
table_to_table_list
82448244
{}
8245-
| RENAME USER clear_privileges rename_list
8245+
| RENAME USER_SYM clear_privileges rename_list
82468246
{
82478247
Lex->sql_command = SQLCOM_RENAME_USER;
82488248
}
@@ -9654,7 +9654,7 @@ function_call_keyword:
96549654
if ($$ == NULL)
96559655
MYSQL_YYABORT;
96569656
}
9657-
| USER '(' ')'
9657+
| USER_SYM '(' ')'
96589658
{
96599659
$$= new (thd->mem_root) Item_func_user(thd);
96609660
if ($$ == NULL)
@@ -12189,7 +12189,7 @@ drop:
1218912189
lex->set_command(SQLCOM_DROP_PROCEDURE, $3);
1219012190
lex->spname= $4;
1219112191
}
12192-
| DROP USER opt_if_exists clear_privileges user_list
12192+
| DROP USER_SYM opt_if_exists clear_privileges user_list
1219312193
{
1219412194
Lex->set_command(SQLCOM_DROP_USER, $3);
1219512195
}
@@ -13039,14 +13039,14 @@ show_param:
1303913039
lex->sql_command= SQLCOM_SHOW_CREATE_TRIGGER;
1304013040
lex->spname= $3;
1304113041
}
13042-
| CREATE USER
13042+
| CREATE USER_SYM
1304313043
{
1304413044
Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
1304513045
if (!(Lex->grant_user= (LEX_USER*)thd->alloc(sizeof(LEX_USER))))
1304613046
MYSQL_YYABORT;
1304713047
Lex->grant_user->user= current_user;
1304813048
}
13049-
| CREATE USER user
13049+
| CREATE USER_SYM user
1305013050
{
1305113051
Lex->sql_command= SQLCOM_SHOW_CREATE_USER;
1305213052
Lex->grant_user= $3;
@@ -13492,7 +13492,7 @@ kill_expr:
1349213492
{
1349313493
Lex->value_list.push_front($$, thd->mem_root);
1349413494
}
13495-
| USER user
13495+
| USER_SYM user
1349613496
{
1349713497
Lex->users_list.push_back($2, thd->mem_root);
1349813498
Lex->kill_type= KILL_TYPE_USER;
@@ -14912,7 +14912,7 @@ keyword_sp:
1491214912
| UNDOFILE_SYM {}
1491314913
| UNKNOWN_SYM {}
1491414914
| UNTIL_SYM {}
14915-
| USER {}
14915+
| USER_SYM {}
1491614916
| USE_FRM {}
1491714917
| VARIABLES {}
1491814918
| VIEW_SYM {}
@@ -15817,7 +15817,7 @@ object_privilege:
1581715817
| SHOW VIEW_SYM { Lex->grant |= SHOW_VIEW_ACL; }
1581815818
| CREATE ROUTINE_SYM { Lex->grant |= CREATE_PROC_ACL; }
1581915819
| ALTER ROUTINE_SYM { Lex->grant |= ALTER_PROC_ACL; }
15820-
| CREATE USER { Lex->grant |= CREATE_USER_ACL; }
15820+
| CREATE USER_SYM { Lex->grant |= CREATE_USER_ACL; }
1582115821
| EVENT_SYM { Lex->grant |= EVENT_ACL;}
1582215822
| TRIGGER_SYM { Lex->grant |= TRIGGER_ACL; }
1582315823
| CREATE TABLESPACE { Lex->grant |= CREATE_TABLESPACE_ACL; }

0 commit comments

Comments
 (0)