Skip to content

Commit b01a95f

Browse files
committed
row_undo_mod_remove_clust_low(): Remove duplicated code
Some code was duplicated near the start of the function, only for InnoDB, not XtraDB. This was noticed by comparing the InnoDB between MariaDB and MySQL.
1 parent 5b29820 commit b01a95f

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

storage/innobase/row/row0umod.cc

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*****************************************************************************
22
33
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
4-
Copyright (c) 2017, MariaDB Corporation.
4+
Copyright (c) 2017, 2019, MariaDB Corporation.
55
66
This program is free software; you can redistribute it and/or modify it under
77
the terms of the GNU General Public License as published by the Free Software
@@ -212,36 +212,6 @@ row_undo_mod_remove_clust_low(
212212
return(DB_SUCCESS);
213213
}
214214

215-
trx_id_offset = btr_cur_get_index(btr_cur)->trx_id_offset;
216-
217-
if (!trx_id_offset) {
218-
mem_heap_t* heap = NULL;
219-
ulint trx_id_col;
220-
const ulint* offsets;
221-
ulint len;
222-
223-
trx_id_col = dict_index_get_sys_col_pos(
224-
btr_cur_get_index(btr_cur), DATA_TRX_ID);
225-
ut_ad(trx_id_col > 0);
226-
ut_ad(trx_id_col != ULINT_UNDEFINED);
227-
228-
offsets = rec_get_offsets(
229-
btr_cur_get_rec(btr_cur), btr_cur_get_index(btr_cur),
230-
NULL, trx_id_col + 1, &heap);
231-
232-
trx_id_offset = rec_get_nth_field_offs(
233-
offsets, trx_id_col, &len);
234-
ut_ad(len == DATA_TRX_ID_LEN);
235-
mem_heap_free(heap);
236-
}
237-
238-
if (trx_read_trx_id(btr_cur_get_rec(btr_cur) + trx_id_offset)
239-
!= node->new_trx_id) {
240-
/* The record must have been purged and then replaced
241-
with a different one. */
242-
return(DB_SUCCESS);
243-
}
244-
245215
/* We are about to remove an old, delete-marked version of the
246216
record that may have been delete-marked by a different transaction
247217
than the rolling-back one. */

0 commit comments

Comments
 (0)