diff options
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 7d59598d606..73e9734280f 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -6548,7 +6548,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, if (alter_info->keys_onoff != LEAVE_AS_IS || table->file->indexes_are_disabled()) need_lock_for_indexes= true; - if (!table->s->tmp_table && + if (!table->s->tmp_table && need_lock_for_indexes && wait_while_table_is_used(thd, table, extra_func)) goto err_new_table_cleanup; thd_proc_info(thd, "manage keys"); |