Skip to content

Commit

Permalink
#36 use copy of alter_info for inplace alter since mysql_prepare_crea…
Browse files Browse the repository at this point in the history
…te_table is not idempotent
  • Loading branch information
prohaska committed Feb 25, 2014
1 parent 7b05a0d commit 278a06c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sql/sql_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6526,13 +6526,15 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
uint tables_opened = 0;
Alter_table_ctx alter_ctx(thd, table_list, tables_opened, new_db, new_name);
copied= deleted= 0; // needed for my_ok

Alter_info tmp_alter_info(*alter_info, thd->mem_root);

enum inplace_alter_table_result r;
r= mysql_inplace_alter_table(thd,
table_list,
table,
create_info,
alter_info,
&tmp_alter_info,
order_num, order, ignore, &alter_ctx);
switch (r) {
case INPLACE_ALTER_SUCCESS:
Expand Down

0 comments on commit 278a06c

Please sign in to comment.