summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-02-20 10:16:52 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-02-20 10:30:14 +0200
commit1fa14a7c08c55fbe7c095ce16909cb5ef0d2bcb6 (patch)
tree4ba7d016cd0747adf1b720bf493d1e0de41f0d53 /storage
parent60a68fdf710d60ae6abf839712920a7908308d66 (diff)
downloadmariadb-git-1fa14a7c08c55fbe7c095ce16909cb5ef0d2bcb6.tar.gz
Replace trx_undo_mem_free() with ut_free()
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/include/trx0undo.h6
-rw-r--r--storage/innobase/trx/trx0purge.cc2
-rw-r--r--storage/innobase/trx/trx0rseg.cc2
-rw-r--r--storage/innobase/trx/trx0undo.cc22
4 files changed, 7 insertions, 25 deletions
diff --git a/storage/innobase/include/trx0undo.h b/storage/innobase/include/trx0undo.h
index aeffbf1a65e..b9e5d72866b 100644
--- a/storage/innobase/include/trx0undo.h
+++ b/storage/innobase/include/trx0undo.h
@@ -326,12 +326,6 @@ trx_undo_parse_page_header(
ulint
trx_undo_mem_create_at_db_start(trx_rseg_t* rseg, ulint id, ulint page_no,
trx_id_t& max_trx_id);
-/************************************************************************
-Frees an undo log memory copy. */
-void
-trx_undo_mem_free(
-/*==============*/
- trx_undo_t* undo); /* in: the undo object to be freed */
#endif /* !UNIV_INNOCHECKSUM */
diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc
index 7220c577771..34f72929d03 100644
--- a/storage/innobase/trx/trx0purge.cc
+++ b/storage/innobase/trx/trx0purge.cc
@@ -347,7 +347,7 @@ trx_purge_add_undo_to_history(const trx_t* trx, trx_undo_t*& undo, mtr_t* mtr)
MONITOR_INC(MONITOR_NUM_UNDO_SLOT_CACHED);
} else {
ut_ad(undo->state == TRX_UNDO_TO_PURGE);
- trx_undo_mem_free(undo);
+ ut_free(undo);
}
undo = NULL;
diff --git a/storage/innobase/trx/trx0rseg.cc b/storage/innobase/trx/trx0rseg.cc
index 398c09f7915..4b09a4cc492 100644
--- a/storage/innobase/trx/trx0rseg.cc
+++ b/storage/innobase/trx/trx0rseg.cc
@@ -129,7 +129,7 @@ trx_rseg_mem_free(trx_rseg_t* rseg)
MONITOR_DEC(MONITOR_NUM_UNDO_SLOT_CACHED);
- trx_undo_mem_free(undo);
+ ut_free(undo);
}
ut_free(rseg);
diff --git a/storage/innobase/trx/trx0undo.cc b/storage/innobase/trx/trx0undo.cc
index 8465d044d03..4a3f1d83ed9 100644
--- a/storage/innobase/trx/trx0undo.cc
+++ b/storage/innobase/trx/trx0undo.cc
@@ -1255,18 +1255,6 @@ trx_undo_mem_init_for_reuse(
undo->empty = TRUE;
}
-/********************************************************************//**
-Frees an undo log memory copy. */
-void
-trx_undo_mem_free(
-/*==============*/
- trx_undo_t* undo) /*!< in: the undo object to be freed */
-{
- ut_a(undo->id < TRX_RSEG_N_SLOTS);
-
- ut_free(undo);
-}
-
/** Create an undo log.
@param[in,out] trx transaction
@param[in,out] rseg rollback segment
@@ -1626,7 +1614,7 @@ trx_undo_commit_cleanup(trx_undo_t* undo, bool is_temp)
ut_ad(rseg->curr_size > undo->size);
rseg->curr_size -= undo->size;
- trx_undo_mem_free(undo);
+ ut_free(undo);
}
mutex_exit(&rseg->mutex);
@@ -1659,7 +1647,7 @@ trx_undo_free_at_shutdown(trx_t *trx)
}
UT_LIST_REMOVE(trx->rsegs.m_redo.rseg->undo_list, undo);
- trx_undo_mem_free(undo);
+ ut_free(undo);
undo = NULL;
}
@@ -1686,7 +1674,7 @@ trx_undo_free_at_shutdown(trx_t *trx)
}
UT_LIST_REMOVE(trx->rsegs.m_redo.rseg->old_insert_list, undo);
- trx_undo_mem_free(undo);
+ ut_free(undo);
undo = NULL;
}
@@ -1694,7 +1682,7 @@ trx_undo_free_at_shutdown(trx_t *trx)
ut_a(undo->state == TRX_UNDO_PREPARED);
UT_LIST_REMOVE(trx->rsegs.m_noredo.rseg->undo_list, undo);
- trx_undo_mem_free(undo);
+ ut_free(undo);
undo = NULL;
}
}
@@ -1757,7 +1745,7 @@ trx_undo_truncate_tablespace(
next_undo = UT_LIST_GET_NEXT(undo_list, undo);
UT_LIST_REMOVE(rseg->undo_cached, undo);
MONITOR_DEC(MONITOR_NUM_UNDO_SLOT_CACHED);
- trx_undo_mem_free(undo);
+ ut_free(undo);
}
UT_LIST_INIT(rseg->undo_list, &trx_undo_t::undo_list);