mariadb/storage/innobase/trx
Marko Mäkelä 6066e5d13c MDEV-36122: Work around missing MDL in purge
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
2025-03-26 14:23:45 +02:00
..
trx0i_s.cc MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
trx0purge.cc MDEV-36122: Work around missing MDL in purge 2025-03-26 14:23:45 +02:00
trx0rec.cc MDEV-35174 Possible hang in trx_undo_prev_version() 2024-10-16 14:37:44 +03:00
trx0roll.cc MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
trx0rseg.cc MDEV-34678 pthread_mutex_init() without pthread_mutex_destroy() 2024-08-14 07:54:15 +03:00
trx0sys.cc MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
trx0trx.cc MDEV-24035 fixup: GCC 4.8.5 CMAKE_BUILD_TYPE=Debug 2025-03-26 10:40:31 +01:00
trx0undo.cc Merge 10.5 into 10.6 2024-11-29 12:37:46 +02:00