mirror of
https://github.com/MariaDB/server.git
synced 2025-11-12 16:56:15 +01:00
prepare_inplace_alter_table_dict(): If an unexpected reference to the table exists, wait for the purge subsystem to release its table handle, similar to how we would do in case FULLTEXT INDEX existed. This function is supposed to be protected by MDL_EXCLUSIVE on the table name. If purge is going to access the table again later during is ALTER TABLE operation, it will have access to an MDL compatible name for it and therefore should conflict with any MDL_EXCLUSIVE that would cover ha_innobase::commit_inplace_alter_table(commit=true). This change should prevent race conditions where purge had initially looked up a table for which row-level undo log records had been written by ALTER IGNORE TABLE, and purge did not finish before a subsequent ALTER TABLE is trying to rebuild the table. trx_purge_attach_undo_recs(), purge_sys_t::batch_cleanup(): Clear purge_sys.m_active only after all table handles have been released. ha_innobase::truncate(): Before locking the data dictionary, ensure that the purge subsystem is not holding a reference to the table due to insufficient metadata locking related to an earlier ALTER IGNORE TABLE operation. Reviewed by: Debarun Banerjee |
||
|---|---|---|
| .. | ||
| trx0i_s.cc | ||
| trx0purge.cc | ||
| trx0rec.cc | ||
| trx0roll.cc | ||
| trx0rseg.cc | ||
| trx0sys.cc | ||
| trx0trx.cc | ||
| trx0undo.cc | ||