Commit 8a5eb414 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-17138 follow-up: Use MLOG_MEMSET for writing FIL_NULL

Always use the MLOG_MEMSET record for writing FIL_NULL,
because it is more compact.
parent c24ec3ce
......@@ -107,12 +107,12 @@ PageBulk::init()
} else {
ut_ad(!dict_index_is_spatial(m_index));
page_create(new_block, &m_mtr,
dict_table_is_comp(m_index->table),
m_index->table->not_redundant(),
false);
mlog_write_ulint(FIL_PAGE_PREV + new_page, FIL_NULL,
MLOG_4BYTES, &m_mtr);
mlog_write_ulint(FIL_PAGE_NEXT + new_page, FIL_NULL,
MLOG_4BYTES, &m_mtr);
compile_time_assert(FIL_PAGE_NEXT
== FIL_PAGE_PREV + 4);
compile_time_assert(FIL_NULL == 0xffffffff);
mlog_memset(new_block, FIL_PAGE_PREV, 8, 0xff, &m_mtr);
mlog_write_ulint(PAGE_HEADER + PAGE_LEVEL + new_page,
m_level, MLOG_2BYTES, &m_mtr);
mlog_write_ull(PAGE_HEADER + PAGE_INDEX_ID + new_page,
......
......@@ -7776,12 +7776,11 @@ btr_store_big_rec_extern_fields(
ut_a(err == Z_STREAM_END
|| c_stream.avail_out == 0);
/* Write the "next BLOB page" pointer */
mlog_write_ulint(page + FIL_PAGE_NEXT,
FIL_NULL, MLOG_4BYTES, &mtr);
/* Initialize the unused "prev page" pointer */
mlog_write_ulint(page + FIL_PAGE_PREV,
FIL_NULL, MLOG_4BYTES, &mtr);
compile_time_assert(FIL_PAGE_NEXT
== FIL_PAGE_PREV + 4);
compile_time_assert(FIL_NULL == 0xffffffff);
mlog_memset(block, FIL_PAGE_PREV, 8, 0xff,
&mtr);
/* Write a back pointer to the record
into the otherwise unused area. This
information could be useful in
......
......@@ -906,10 +906,10 @@ dict_drop_index_tree(
btr_pcur_t* pcur,
mtr_t* mtr)
{
const byte* ptr;
ulint len;
ulint space;
ulint root_page_no;
byte* ptr;
ulint len;
ulint space;
ulint root_page_no;
ut_ad(mutex_own(&dict_sys.mutex));
ut_a(!dict_table_is_comp(dict_sys.sys_indexes));
......@@ -928,7 +928,8 @@ dict_drop_index_tree(
return(false);
}
mlog_write_ulint(const_cast<byte*>(ptr), FIL_NULL, MLOG_4BYTES, mtr);
compile_time_assert(FIL_NULL == 0xffffffff);
mlog_memset(ptr, 4, 0xff, mtr);
ptr = rec_get_nth_field_old(
rec, DICT_FLD__SYS_INDEXES__SPACE, &len);
......
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