summaryrefslogtreecommitdiff
path: root/innobase/row/row0purge.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/row/row0purge.c')
-rw-r--r--innobase/row/row0purge.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/innobase/row/row0purge.c b/innobase/row/row0purge.c
index 0dffa273938..390f1b59a4d 100644
--- a/innobase/row/row0purge.c
+++ b/innobase/row/row0purge.c
@@ -208,7 +208,7 @@ row_purge_remove_sec_if_poss_low(
ibool found;
ulint err;
mtr_t mtr;
- mtr_t mtr_vers;
+ mtr_t* mtr_vers;
UT_NOT_USED(thr);
@@ -235,17 +235,21 @@ row_purge_remove_sec_if_poss_low(
which cannot be purged yet, requires its existence. If some requires,
we should do nothing. */
- mtr_start(&mtr_vers);
+ mtr_vers = mem_alloc(sizeof(mtr_t));
+
+ mtr_start(mtr_vers);
- success = row_purge_reposition_pcur(BTR_SEARCH_LEAF, node, &mtr_vers);
+ success = row_purge_reposition_pcur(BTR_SEARCH_LEAF, node, mtr_vers);
if (success) {
old_has = row_vers_old_has_index_entry(TRUE,
btr_pcur_get_rec(&(node->pcur)),
- &mtr_vers, index, entry);
+ mtr_vers, index, entry);
}
- btr_pcur_commit_specify_mtr(&(node->pcur), &mtr_vers);
+ btr_pcur_commit_specify_mtr(&(node->pcur), mtr_vers);
+
+ mem_free(mtr_vers);
if (!success || !old_has) {
/* Remove the index record */
@@ -489,11 +493,6 @@ row_purge_parse_undo_rec(
return(FALSE);
}
- /* NOTE that the table has to be explicitly released later */
-
- /* TODO: currently nothing prevents dropping of table when purge
- is accessing it! */
-
mutex_enter(&(dict_sys->mutex));
node->table = dict_table_get_on_id_low(table_id, thr_get_trx(thr));