diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 439f2a8605248..062b636624621 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -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 @@ -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; @@ -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;