Skip to content

Commit

Permalink
cleanup: udt in sql_yac.yy
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Jul 4, 2023
1 parent 5bf80af commit bbe44da
Showing 1 changed file with 9 additions and 22 deletions.
31 changes: 9 additions & 22 deletions sql/sql_yacc.yy
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
sp_opt_label BIN_NUM TEXT_STRING_filesystem
opt_constraint constraint opt_ident
sp_block_label sp_control_label opt_place opt_db
udt_name

%type <ident_sys>
IDENT_sys
Expand Down Expand Up @@ -6296,23 +6297,19 @@ qualified_field_type:
}
;

udt_name:
IDENT_sys { $$= $1; }
| reserved_keyword_udt { $$= $1; }
| non_reserved_keyword_udt { $$= $1; }
;

field_type_all:
field_type_numeric
| field_type_temporal
| field_type_string
| field_type_lob
| field_type_misc
| IDENT_sys float_options srid_option
{
if (Lex->set_field_type_udt(&$$, $1, $2))
MYSQL_YYABORT;
}
| reserved_keyword_udt float_options srid_option
{
if (Lex->set_field_type_udt(&$$, $1, $2))
MYSQL_YYABORT;
}
| non_reserved_keyword_udt float_options srid_option
| udt_name float_options srid_option
{
if (Lex->set_field_type_udt(&$$, $1, $2))
MYSQL_YYABORT;
Expand Down Expand Up @@ -11468,17 +11465,7 @@ cast_type:
}
| cast_type_numeric { $$= $1; Lex->charset= NULL; }
| cast_type_temporal { $$= $1; Lex->charset= NULL; }
| IDENT_sys
{
if (Lex->set_cast_type_udt(&$$, $1))
MYSQL_YYABORT;
}
| reserved_keyword_udt
{
if (Lex->set_cast_type_udt(&$$, $1))
MYSQL_YYABORT;
}
| non_reserved_keyword_udt
| udt_name
{
if (Lex->set_cast_type_udt(&$$, $1))
MYSQL_YYABORT;
Expand Down

0 comments on commit bbe44da

Please sign in to comment.