diff options
Diffstat (limited to 'innobase/row/row0purge.c')
-rw-r--r-- | innobase/row/row0purge.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/innobase/row/row0purge.c b/innobase/row/row0purge.c index 109d0f3b976..8897a1a872f 100644 --- a/innobase/row/row0purge.c +++ b/innobase/row/row0purge.c @@ -100,7 +100,8 @@ row_purge_remove_clust_if_poss_low( ulint err; mtr_t mtr; rec_t* rec; - mem_heap_t* heap; + mem_heap_t* heap = NULL; + ulint offsets_[100] = { 100, }; index = dict_table_get_first_index(node->table); @@ -120,19 +121,22 @@ row_purge_remove_clust_if_poss_low( } rec = btr_pcur_get_rec(pcur); - heap = mem_heap_create(100); if (0 != ut_dulint_cmp(node->roll_ptr, row_get_rec_roll_ptr(rec, index, rec_get_offsets( - rec, index, ULINT_UNDEFINED, heap)))) { - mem_heap_free(heap); + rec, index, offsets_, ULINT_UNDEFINED, &heap)))) { + if (heap) { + mem_heap_free(heap); + } /* Someone else has modified the record later: do not remove */ btr_pcur_commit_specify_mtr(pcur, &mtr); return(TRUE); } - mem_heap_free(heap); + if (heap) { + mem_heap_free(heap); + } if (mode == BTR_MODIFY_LEAF) { success = btr_cur_optimistic_delete(btr_cur, &mtr); |