diff --git a/storage/innobase/include/row0purge.h b/storage/innobase/include/row0purge.h index 3cf4a7b982a..e08ef8ab9f9 100644 --- a/storage/innobase/include/row0purge.h +++ b/storage/innobase/include/row0purge.h @@ -98,7 +98,7 @@ struct purge_node_t{ upd_t* update; /*!< update vector for a clustered index record */ - dtuple_t* ref; /*!< NULL, or row reference to the next row to + const dtuple_t* ref; /*!< NULL, or row reference to the next row to handle */ dtuple_t* row; /*!< NULL, or a copy (also fields copied to heap) of the indexed fields of the row to diff --git a/storage/innobase/include/row0undo.h b/storage/innobase/include/row0undo.h index 730e7f559c6..f7cec643b33 100644 --- a/storage/innobase/include/row0undo.h +++ b/storage/innobase/include/row0undo.h @@ -111,7 +111,7 @@ struct undo_node_t{ ulint cmpl_info;/*!< compiler analysis of an update */ upd_t* update; /*!< update vector for a clustered index record */ - dtuple_t* ref; /*!< row reference to the next row to handle */ + const dtuple_t* ref; /*!< row reference to the next row to handle */ dtuple_t* row; /*!< a copy (also fields copied to heap) of the row to handle */ row_ext_t* ext; /*!< NULL, or prefixes of the externally diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h index cc211bd42fd..97f23b11790 100644 --- a/storage/innobase/include/trx0rec.h +++ b/storage/innobase/include/trx0rec.h @@ -98,7 +98,7 @@ trx_undo_rec_get_row_ref( used, as we do NOT copy the data in the record! */ dict_index_t* index, /*!< in: clustered index */ - dtuple_t** ref, /*!< out, own: row reference */ + const dtuple_t**ref, /*!< out, own: row reference */ mem_heap_t* heap); /*!< in: memory heap from which the memory needed is allocated */ /**********************************************************************//** diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc index 260e79d67f9..02a9f82b3c6 100644 --- a/storage/innobase/trx/trx0rec.cc +++ b/storage/innobase/trx/trx0rec.cc @@ -635,7 +635,7 @@ trx_undo_rec_get_row_ref( used, as we do NOT copy the data in the record! */ dict_index_t* index, /*!< in: clustered index */ - dtuple_t** ref, /*!< out, own: row reference */ + const dtuple_t**ref, /*!< out, own: row reference */ mem_heap_t* heap) /*!< in: memory heap from which the memory needed is allocated */ { @@ -647,17 +647,17 @@ trx_undo_rec_get_row_ref( ref_len = dict_index_get_n_unique(index); - *ref = dtuple_create(heap, ref_len); + dtuple_t* tuple = dtuple_create(heap, ref_len); + *ref = tuple; - dict_index_copy_types(*ref, index, ref_len); + dict_index_copy_types(tuple, index, ref_len); for (i = 0; i < ref_len; i++) { - dfield_t* dfield; const byte* field; ulint len; ulint orig_len; - dfield = dtuple_get_nth_field(*ref, i); + dfield_t* dfield = dtuple_get_nth_field(tuple, i); ptr = trx_undo_rec_get_col_val(ptr, &field, &len, &orig_len);