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