From: Date: August 8 2007 7:35pm Subject: bk commit into 5.1 tree (malff:1.2563) BUG#30276 List-Archive: http://lists.mysql.com/commits/32266 X-Bug: 30276 Message-Id: <20070808173621.3F6228E1CF1@weblab.mysql.com> Below is the list of changes that have just been committed into a local 5.1 repository of marcsql. When marcsql does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-08-08 11:35:51-06:00, malff@weblab.(none) +1 -0 Bug#30276 (table with a dynamic attribute and ROW_FORMAT=FIXED should warn DYNAMIC anyhow) NOT A FULL PATCH -- Syntax change proposal, for discussion This patch introduces an extended 'ONLINE' syntax, for the following statements: - ALTER ONLINE TABLE - CREATE ONLINE INDEX - DROP ONLINE INDEX sql/sql_yacc.yy@stripped, 2007-08-08 11:35:45-06:00, malff@weblab.(none) +15 -9 Bug#30276 (table with a dynamic attribute and ROW_FORMAT=FIXED should warn DYNAMIC anyhow) NOT A FULL PATCH -- Syntax change proposal, for discussion This patch introduces an extended 'ONLINE' syntax, for the following statements: - ALTER ONLINE TABLE - CREATE ONLINE INDEX - DROP ONLINE INDEX diff -Nrup a/sql/sql_yacc.yy b/sql/sql_yacc.yy --- a/sql/sql_yacc.yy 2007-08-03 11:04:52 -06:00 +++ b/sql/sql_yacc.yy 2007-08-08 11:35:45 -06:00 @@ -843,6 +843,7 @@ bool my_yyoverflow(short **a, YYSTYPE ** %token ON /* SQL-2003-R */ %token ONE_SHOT_SYM %token ONE_SYM +%token ONLINE_SYM /* MYSQL */ %token OPEN_SYM /* SQL-2003-R */ %token OPTIMIZE %token OPTIONS_SYM @@ -1594,12 +1595,12 @@ create: $5->table.str); } } - | CREATE opt_unique_or_fulltext INDEX_SYM ident key_alg ON + | CREATE opt_online opt_unique_or_fulltext INDEX_SYM ident key_alg ON table_ident { LEX *lex=Lex; lex->sql_command= SQLCOM_CREATE_INDEX; - if (!lex->current_select->add_table_to_list(lex->thd, $7, + if (!lex->current_select->add_table_to_list(lex->thd, $8, NULL, TL_OPTION_UPDATING)) MYSQL_YYABORT; @@ -1612,12 +1613,12 @@ create: { LEX *lex=Lex; Key *key; - if ($2 != Key::FULLTEXT && lex->key_create_info.parser_name.str) + if ($3 != Key::FULLTEXT && lex->key_create_info.parser_name.str) { my_parse_error(ER(ER_SYNTAX_ERROR)); MYSQL_YYABORT; } - key= new Key($2, $4.str, &lex->key_create_info, 0, + key= new Key($3, $5.str, &lex->key_create_info, 0, lex->col_list); lex->alter_info.key_list.push_back(key); lex->col_list.empty(); @@ -5095,12 +5096,16 @@ string_list: text_string { Lex->interval_list.push_back($1); } | string_list ',' text_string { Lex->interval_list.push_back($3); }; +opt_online: + /* empty */ + | ONLINE_SYM + ; /* ** Alter table */ alter: - ALTER opt_ignore TABLE_SYM table_ident + ALTER opt_online opt_ignore TABLE_SYM table_ident { THD *thd= YYTHD; LEX *lex= thd->lex; @@ -5108,7 +5113,7 @@ alter: lex->name.length= 0; lex->sql_command= SQLCOM_ALTER_TABLE; lex->duplicates= DUP_ERROR; - if (!lex->select_lex.add_table_to_list(thd, $4, NULL, + if (!lex->select_lex.add_table_to_list(thd, $5, NULL, TL_OPTION_UPDATING)) MYSQL_YYABORT; lex->alter_info.reset(); @@ -8167,15 +8172,15 @@ drop: lex->drop_temporary= $2; lex->drop_if_exists= $4; } - | DROP INDEX_SYM ident ON table_ident {} + | DROP opt_online INDEX_SYM ident ON table_ident {} { LEX *lex=Lex; lex->sql_command= SQLCOM_DROP_INDEX; lex->alter_info.reset(); lex->alter_info.flags= ALTER_DROP_INDEX; lex->alter_info.drop_list.push_back(new Alter_drop(Alter_drop::KEY, - $3.str)); - if (!lex->current_select->add_table_to_list(lex->thd, $5, NULL, + $4.str)); + if (!lex->current_select->add_table_to_list(lex->thd, $6, NULL, TL_OPTION_UPDATING)) MYSQL_YYABORT; } @@ -10072,6 +10077,7 @@ keyword_sp: | OLD_PASSWORD {} | ONE_SHOT_SYM {} | ONE_SYM {} + | ONLINE_SYM {} | PACK_KEYS_SYM {} | PARTIAL {} | PARTITIONING_SYM {}