Skip to content

Commit bbe44da

Browse files
committed
cleanup: udt in sql_yac.yy
1 parent 5bf80af commit bbe44da

File tree

1 file changed

+9
-22
lines changed

1 file changed

+9
-22
lines changed

sql/sql_yacc.yy

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,6 +1323,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
13231323
sp_opt_label BIN_NUM TEXT_STRING_filesystem
13241324
opt_constraint constraint opt_ident
13251325
sp_block_label sp_control_label opt_place opt_db
1326+
udt_name
13261327

13271328
%type <ident_sys>
13281329
IDENT_sys
@@ -6296,23 +6297,19 @@ qualified_field_type:
62966297
}
62976298
;
62986299

6300+
udt_name:
6301+
IDENT_sys { $$= $1; }
6302+
| reserved_keyword_udt { $$= $1; }
6303+
| non_reserved_keyword_udt { $$= $1; }
6304+
;
6305+
62996306
field_type_all:
63006307
field_type_numeric
63016308
| field_type_temporal
63026309
| field_type_string
63036310
| field_type_lob
63046311
| field_type_misc
6305-
| IDENT_sys float_options srid_option
6306-
{
6307-
if (Lex->set_field_type_udt(&$$, $1, $2))
6308-
MYSQL_YYABORT;
6309-
}
6310-
| reserved_keyword_udt float_options srid_option
6311-
{
6312-
if (Lex->set_field_type_udt(&$$, $1, $2))
6313-
MYSQL_YYABORT;
6314-
}
6315-
| non_reserved_keyword_udt float_options srid_option
6312+
| udt_name float_options srid_option
63166313
{
63176314
if (Lex->set_field_type_udt(&$$, $1, $2))
63186315
MYSQL_YYABORT;
@@ -11468,17 +11465,7 @@ cast_type:
1146811465
}
1146911466
| cast_type_numeric { $$= $1; Lex->charset= NULL; }
1147011467
| cast_type_temporal { $$= $1; Lex->charset= NULL; }
11471-
| IDENT_sys
11472-
{
11473-
if (Lex->set_cast_type_udt(&$$, $1))
11474-
MYSQL_YYABORT;
11475-
}
11476-
| reserved_keyword_udt
11477-
{
11478-
if (Lex->set_cast_type_udt(&$$, $1))
11479-
MYSQL_YYABORT;
11480-
}
11481-
| non_reserved_keyword_udt
11468+
| udt_name
1148211469
{
1148311470
if (Lex->set_cast_type_udt(&$$, $1))
1148411471
MYSQL_YYABORT;

0 commit comments

Comments
 (0)