diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-09-20 09:14:04 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-09-20 09:14:04 +0300 |
commit | 5d9d379329abcbb661ed6c027efbb9fd763958c6 (patch) | |
tree | 12e15e838fd0013d5536079ab5596f8907eeffc4 | |
parent | 5ab78cf340ac3f29f133359b5419b1d61b80f1fa (diff) | |
download | mariadb-git-5d9d379329abcbb661ed6c027efbb9fd763958c6.tar.gz |
MDEV-15020 fixup: Make trx_t::apply_log() truly ATTRIBUTE_COLD
-rw-r--r-- | storage/innobase/trx/trx0trx.cc | 3 | ||||
-rw-r--r-- | storage/innobase/trx/trx0undo.cc | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index a8f8d7dcc79..3b19d213d5a 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -1429,7 +1429,8 @@ TRANSACTIONAL_TARGET void trx_t::commit_low(mtr_t *mtr) if (mtr) { - apply_log(); + if (UNIV_UNLIKELY(apply_online_log)) + apply_log(); trx_write_serialisation_history(this, mtr); /* The following call commits the mini-transaction, making the diff --git a/storage/innobase/trx/trx0undo.cc b/storage/innobase/trx/trx0undo.cc index d846894fc2f..cd21ebe1319 100644 --- a/storage/innobase/trx/trx0undo.cc +++ b/storage/innobase/trx/trx0undo.cc @@ -360,10 +360,8 @@ inline void UndorecApplier::apply_undo_rec() /** Apply any changes to tables for which online DDL is in progress. */ ATTRIBUTE_COLD void trx_t::apply_log() { - if (undo_no == 0 || apply_online_log == false) - return; const trx_undo_t *undo= rsegs.m_redo.undo; - if (!undo) + if (!undo || !undo_no) return; page_id_t page_id{rsegs.m_redo.rseg->space->id, undo->hdr_page_no}; page_id_t next_page_id(page_id); |