diff options
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index efd8c20e6d7..864d838c183 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1260,7 +1260,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); clear_privileges flush_options flush_option equal optional_braces opt_mi_check_type opt_to mi_check_types normal_join - db_to_db table_to_table_list table_to_table opt_table_list opt_as + table_to_table_list table_to_table opt_table_list opt_as handler_rkey_function handler_read_or_scan single_multi table_wild_list table_wild_one opt_wild union_clause union_list @@ -5400,6 +5400,17 @@ alter: lex->copy_db_to(&lex->name.str, &lex->name.length)) MYSQL_YYABORT; } + | ALTER DATABASE ident UPGRADE_SYM DATA_SYM DIRECTORY_SYM NAME_SYM + { + LEX *lex= Lex; + if (lex->sphead) + { + my_error(ER_SP_NO_DROP_SP, MYF(0), "DATABASE"); + MYSQL_YYABORT; + } + lex->sql_command= SQLCOM_ALTER_DB_UPGRADE; + lex->name= $3; + } | ALTER PROCEDURE sp_name { LEX *lex= Lex; @@ -6184,13 +6195,6 @@ rename: } table_to_table_list {} - | RENAME DATABASE - { - Lex->db_list.empty(); - Lex->sql_command= SQLCOM_RENAME_DB; - } - db_to_db - {} | RENAME USER clear_privileges rename_list { Lex->sql_command = SQLCOM_RENAME_USER; @@ -6228,18 +6232,6 @@ table_to_table: } ; -db_to_db: - ident TO_SYM ident - { - LEX *lex=Lex; - if (lex->db_list.push_back((LEX_STRING*) - sql_memdup(&$1, sizeof(LEX_STRING))) || - lex->db_list.push_back((LEX_STRING*) - sql_memdup(&$3, sizeof(LEX_STRING)))) - MYSQL_YYABORT; - } - ; - keycache: CACHE_SYM INDEX_SYM keycache_list IN_SYM key_cache_name { |