Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions storage/innobase/row/row0pread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,14 @@ void Parallel_reader::Scan_ctx::copy_row(const rec_t *rec, Iter *iter) const {

auto copy_rec = static_cast<rec_t *>(mem_heap_alloc(iter->m_heap, rec_len));

memcpy(copy_rec, rec, rec_len);

iter->m_rec = copy_rec;
/* In InnoDB rec_t points after the extra bytes. */
const auto extra = rec_offs_extra_size(iter->m_offsets);
ut_ad(extra <= rec_len);

memcpy(copy_rec, rec - extra, rec_len);
/* Even though we (by convention) point after extra bytes, all of them
will be freed, as instead of free(iter->m_rec) we use mem_heap_empty(). */
iter->m_rec = copy_rec + extra;

auto tuple = row_rec_to_index_entry_low(iter->m_rec, m_config.m_index,
iter->m_offsets, iter->m_heap);
Expand Down