summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index e8bc1531de7..17df5d6dbde 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -9868,8 +9868,8 @@ bool mysql_recreate_table(THD *thd, TABLE_LIST *table_list, bool table_copy)
HA_CREATE_INFO create_info;
Alter_info alter_info;
TABLE_LIST *next_table= table_list->next_global;
-
DBUG_ENTER("mysql_recreate_table");
+
/* Set lock type which is appropriate for ALTER TABLE. */
table_list->lock_type= TL_READ_NO_INSERT;
/* Same applies to MDL request. */
@@ -9887,6 +9887,8 @@ bool mysql_recreate_table(THD *thd, TABLE_LIST *table_list, bool table_copy)
if (table_copy)
alter_info.requested_algorithm= Alter_info::ALTER_TABLE_ALGORITHM_COPY;
+ thd->prepare_logs_for_admin_command();
+
bool res= mysql_alter_table(thd, NullS, NullS, &create_info,
table_list, &alter_info, 0,
(ORDER *) 0, 0);