diff --git a/storage/innobase/include/row0upd.h b/storage/innobase/include/row0upd.h index 359d243a0cd..ec7995dd096 100644 --- a/storage/innobase/include/row0upd.h +++ b/storage/innobase/include/row0upd.h @@ -87,8 +87,7 @@ upd_field_set_field_no( upd_field_t* upd_field, /*!< in: update vector field */ ulint field_no, /*!< in: field number in a clustered index */ - dict_index_t* index, /*!< in: index */ - trx_t* trx); /*!< in: transaction */ + dict_index_t* index); /** set field number to a update vector field, marks this field is updated @param[in,out] upd_field update vector field diff --git a/storage/innobase/include/row0upd.ic b/storage/innobase/include/row0upd.ic index 18c72309930..11271d6e9af 100644 --- a/storage/innobase/include/row0upd.ic +++ b/storage/innobase/include/row0upd.ic @@ -95,22 +95,10 @@ upd_field_set_field_no( upd_field_t* upd_field, /*!< in: update vector field */ ulint field_no, /*!< in: field number in a clustered index */ - dict_index_t* index, /*!< in: index */ - trx_t* trx) /*!< in: transaction */ + dict_index_t* index) /*!< in: index */ { upd_field->field_no = unsigned(field_no); upd_field->orig_len = 0; - - if (UNIV_UNLIKELY(field_no >= dict_index_get_n_fields(index))) { - ib::error() - << " trying to access field " << field_no - << " in " << index->name - << " of table " << index->table->name - << " which contains only " << index->n_fields - << " fields"; - ut_ad(0); - } - dict_col_copy_type(dict_index_get_nth_col(index, field_no), dfield_get_type(&upd_field->new_val)); } diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h index 3b4a195735b..61398d3540d 100644 --- a/storage/innobase/include/trx0rec.h +++ b/storage/innobase/include/trx0rec.h @@ -152,7 +152,6 @@ trx_undo_update_rec_get_update( trx_id_t trx_id, /*!< in: transaction id from this undorecord */ roll_ptr_t roll_ptr,/*!< in: roll pointer from this undo record */ ulint info_bits,/*!< in: info bits from this undo record */ - trx_t* trx, /*!< in: transaction */ mem_heap_t* heap, /*!< in: memory heap from which the memory needed is allocated */ upd_t** upd); /*!< out, own: update vector */ diff --git a/storage/innobase/pars/pars0pars.cc b/storage/innobase/pars/pars0pars.cc index 21325cac12a..56ca037f247 100644 --- a/storage/innobase/pars/pars0pars.cc +++ b/storage/innobase/pars/pars0pars.cc @@ -1180,7 +1180,7 @@ pars_process_assign_list( upd_field_set_field_no(upd_field, dict_index_get_nth_col_pos( clust_index, col_sym->col_no, NULL), - clust_index, NULL); + clust_index); upd_field->exp = assign_node->val; if (!dict_col_get_fixed_size( diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc index ed07bcb03af..97fbce3b141 100644 --- a/storage/innobase/row/row0purge.cc +++ b/storage/innobase/row/row0purge.cc @@ -819,7 +819,6 @@ row_purge_parse_undo_rec( { dict_index_t* clust_index; byte* ptr; - trx_t* trx; undo_no_t undo_no; table_id_t table_id; trx_id_t trx_id; @@ -911,10 +910,8 @@ err_exit: ptr = trx_undo_rec_get_row_ref(ptr, clust_index, &(node->ref), node->heap); - trx = thr_get_trx(thr); - ptr = trx_undo_update_rec_get_update(ptr, clust_index, type, trx_id, - roll_ptr, info_bits, trx, + roll_ptr, info_bits, node->heap, &(node->update)); /* Read to the partial row the fields that occur in indexes */ diff --git a/storage/innobase/row/row0umod.cc b/storage/innobase/row/row0umod.cc index b45444ef064..f201115da26 100644 --- a/storage/innobase/row/row0umod.cc +++ b/storage/innobase/row/row0umod.cc @@ -1160,7 +1160,7 @@ close_table: node->heap); ptr = trx_undo_update_rec_get_update(ptr, clust_index, type, trx_id, - roll_ptr, info_bits, node->trx, + roll_ptr, info_bits, node->heap, &(node->update)); node->new_trx_id = trx_id; node->cmpl_info = cmpl_info; diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index a8616049464..e7258b08b28 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -1006,7 +1006,7 @@ row_upd_build_sec_rec_difference_binary( dfield_copy(&(upd_field->new_val), dfield); - upd_field_set_field_no(upd_field, i, index, NULL); + upd_field_set_field_no(upd_field, i, index); n_diff++; } @@ -1103,7 +1103,7 @@ row_upd_build_difference_binary( dfield_copy(&(upd_field->new_val), dfield); - upd_field_set_field_no(upd_field, i, index, trx); + upd_field_set_field_no(upd_field, i, index); n_diff++; } diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc index ca715371c44..86eb2542f75 100644 --- a/storage/innobase/trx/trx0rec.cc +++ b/storage/innobase/trx/trx0rec.cc @@ -1453,7 +1453,6 @@ trx_undo_update_rec_get_update( trx_id_t trx_id, /*!< in: transaction id from this undo record */ roll_ptr_t roll_ptr,/*!< in: roll pointer from this undo record */ ulint info_bits,/*!< in: info bits from this undo record */ - trx_t* trx, /*!< in: transaction */ mem_heap_t* heap, /*!< in: memory heap from which the memory needed is allocated */ upd_t** upd) /*!< out, own: update vector */ @@ -1489,7 +1488,7 @@ trx_undo_update_rec_get_update( upd_field_set_field_no(upd_field, dict_index_get_sys_col_pos(index, DATA_TRX_ID), - index, trx); + index); dfield_set_data(&(upd_field->new_val), buf, DATA_TRX_ID_LEN); upd_field = upd_get_nth_field(update, n_fields + 1); @@ -1500,7 +1499,7 @@ trx_undo_update_rec_get_update( upd_field_set_field_no( upd_field, dict_index_get_sys_col_pos(index, DATA_ROLL_PTR), - index, trx); + index); dfield_set_data(&(upd_field->new_val), buf, DATA_ROLL_PTR_LEN); /* Store then the updated ordinary columns to the update vector */ @@ -1561,7 +1560,7 @@ trx_undo_update_rec_get_update( upd_field_set_v_field_no( upd_field, field_no, index); } else { - upd_field_set_field_no(upd_field, field_no, index, trx); + upd_field_set_field_no(upd_field, field_no, index); } ptr = trx_undo_rec_get_col_val(ptr, &field, &len, &orig_len); @@ -2247,7 +2246,7 @@ trx_undo_prev_version_build( ptr = trx_undo_update_rec_get_update(ptr, index, type, trx_id, roll_ptr, info_bits, - NULL, heap, &update); + heap, &update); ut_a(ptr); if (row_upd_changes_field_size_or_external(index, offsets, update)) {