Skip to content

Commit

Permalink
fix(tianmu): refactor the yacc file for #1359
Browse files Browse the repository at this point in the history
  • Loading branch information
streakyPorker authored and Nliver committed Oct 17, 2023
1 parent 9b533af commit c2bd7f7
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions sql/sql_yacc.yy
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, YYLTYPE **c, ulong *yystacksize);
Currently there are 159 shift/reduce conflicts.
We should not introduce new conflicts any more.
*/
%expect 155
%expect 158

/*
Comments for TOKENS.
Expand Down Expand Up @@ -1373,6 +1373,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, YYLTYPE **c, ulong *yystacksize);
definer_opt no_definer definer get_diagnostics
alter_user_command password_expire
group_replication
opt_layer_spec

END_OF_INPUT

%type <NONE> call sp_proc_stmts sp_proc_stmts1 sp_proc_stmt
Expand Down Expand Up @@ -12219,28 +12221,27 @@ show_param:
;

show_engine_param:
STATUS_SYM
opt_layer_spec STATUS_SYM
{
Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS;
}
| layer_ident STATUS_SYM
{
Lex->create_info.layer_name = to_lex_cstring($1);
Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS;
}

| layer_ident table_list STATUS_SYM
{
Lex->create_info.layer_name = to_lex_cstring($1);
Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS;
}

| MUTEX_SYM
{ Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; }
| LOGS_SYM
{ Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; }
;

opt_layer_spec:
/*empty*/{}
| layer_ident opt_table_list
{
Lex->create_info.layer_name = to_lex_cstring($1);
/*
'opt_table_list' injects the full table name automatically
*/
}



layer_ident:
Expand Down

0 comments on commit c2bd7f7

Please sign in to comment.