BUG#28838 - duplicate external_lock in mysql_alter_table
Removed duplicate call to handler::external_lock() when ALTER TABLE that doesn't need to copy a table (quick ALTER TABLE) was executed. Also quick ALTER TABLE doesn't hold LOCK_open anymore when it enables/disables indexes.
This commit is contained in:
parent
62620ecb4e
commit
17d5af9922
@ -3789,11 +3789,9 @@ view_err:
|
|||||||
{
|
{
|
||||||
VOID(pthread_mutex_lock(&LOCK_open));
|
VOID(pthread_mutex_lock(&LOCK_open));
|
||||||
wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN);
|
wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN);
|
||||||
table->file->external_lock(thd, F_WRLCK);
|
VOID(pthread_mutex_unlock(&LOCK_open));
|
||||||
alter_table_manage_keys(table, table->file->indexes_are_disabled(),
|
alter_table_manage_keys(table, table->file->indexes_are_disabled(),
|
||||||
alter_info->keys_onoff);
|
alter_info->keys_onoff);
|
||||||
table->file->external_lock(thd, F_UNLCK);
|
|
||||||
VOID(pthread_mutex_unlock(&LOCK_open));
|
|
||||||
error= ha_commit_stmt(thd);
|
error= ha_commit_stmt(thd);
|
||||||
if (ha_commit(thd))
|
if (ha_commit(thd))
|
||||||
error= 1;
|
error= 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user