Commit 3059f274 authored by Nikita Malyavin's avatar Nikita Malyavin

online alter: relax the lock to upgrade to on the last replication stage

This will allow selects pass until the rename/commit stage.
The lock is anyway upgraded to MDL_EXCLUSIVE later by the
wait_while_table_is_used call in mysql_alter_table.
parent dccce983
......@@ -12354,7 +12354,7 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
DEBUG_SYNC(thd, "alter_table_online_before_lock");
int lock_error=
thd->mdl_context.upgrade_shared_lock(from->mdl_ticket, MDL_EXCLUSIVE,
thd->mdl_context.upgrade_shared_lock(from->mdl_ticket, MDL_SHARED_NO_WRITE,
(double)thd->variables.lock_wait_timeout);
if (!error)
error= lock_error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment