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.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 349cc7f3045..01832036701 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -4674,6 +4674,8 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
goto err;
src_table->table->use_all_columns();
+ DEBUG_SYNC(thd, "create_table_like_after_open");
+
/* Fill HA_CREATE_INFO and Alter_info with description of source table. */
bzero((char*) &local_create_info, sizeof(local_create_info));
local_create_info.db_type= src_table->table->s->db_type();
@@ -4722,6 +4724,9 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table,
thd->mdl_context.is_lock_owner(MDL_key::TABLE, table->db,
table->table_name,
MDL_EXCLUSIVE));
+
+ DEBUG_SYNC(thd, "create_table_like_before_binlog");
+
/*
We have to write the query before we unlock the tables.
*/
@@ -6140,7 +6145,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
case ENABLE:
if (wait_while_table_is_used(thd, table, extra_func))
goto err;
- DBUG_EXECUTE_IF("sleep_alter_enable_indexes", my_sleep(6000000););
+ DEBUG_SYNC(thd,"alter_table_enable_indexes");
error= table->file->ha_enable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
break;
case DISABLE:
@@ -6287,7 +6292,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
need_copy_table= ALTER_TABLE_DATA_CHANGED;
else
{
- enum_alter_table_change_level need_copy_table_res=ALTER_TABLE_METADATA_ONLY;
+ enum_alter_table_change_level need_copy_table_res;
/* Check how much the tables differ. */
if (mysql_compare_tables(table, alter_info,
create_info, order_num,