Skip to content

Commit

Permalink
MDEV-28449 Assertion `index->lock.have_x() == has_index_lock' failed …
Browse files Browse the repository at this point in the history
…in row_log_apply_op

- Alter takes index lock on commit phase twice while applying the
online log for the index build. This leads to assert failure and caused
by MDEV-15250 (4b80c11).
  • Loading branch information
Thirunarayanan committed May 2, 2022
1 parent fc391df commit d8b943f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions storage/innobase/handler/handler0alter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11050,10 +11050,14 @@ ha_innobase::commit_inplace_alter_table(
DBUG_RETURN(true);
}

index->lock.x_unlock();

error = row_log_apply(
m_prebuilt->trx, index, altered_table,
ctx->m_stage);

index->lock.x_lock(SRW_LOCK_CALL);

if (error != DB_SUCCESS) {
goto err_index;
}
Expand Down

0 comments on commit d8b943f

Please sign in to comment.