Commit 2a6fa1c4 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-21132: Use memcpy_aligned, memset_aligned

parent 4b087e17
......@@ -60,11 +60,8 @@ buf_flush_note_modification(
ut_ad(mach_read_from_8(block->frame + FIL_PAGE_LSN) <= end_lsn);
mach_write_to_8(block->frame + FIL_PAGE_LSN, end_lsn);
if (UNIV_LIKELY_NULL(block->page.zip.data)) {
compile_time_assert(FIL_PAGE_LSN % 8 == 0);
*reinterpret_cast<uint64_t*>(FIL_PAGE_LSN
+ block->page.zip.data)
= *reinterpret_cast<const uint64_t*>(FIL_PAGE_LSN
+ block->frame);
memcpy_aligned<8>(FIL_PAGE_LSN + block->page.zip.data,
FIL_PAGE_LSN + block->frame, 8);
}
if (block->page.oldest_modification == 0) {
......
......@@ -2122,8 +2122,7 @@ dberr_t PageConverter::operator()(buf_block_t* block) UNIV_NOTHROW
const bool full_crc32 = fil_space_t::full_crc32(get_space_flags());
byte* frame = get_frame(block);
compile_time_assert(FIL_PAGE_LSN % 8 == 0);
*reinterpret_cast<uint64_t*>(frame + FIL_PAGE_LSN)= 0;
memset_aligned<8>(frame + FIL_PAGE_LSN, 0, 8);
if (!block->page.zip.data) {
buf_flush_init_for_writing(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment