Commit 05b222ff authored by heikki's avatar heikki

Erase the magic number in the trx sys header using a redo-logged write;

it should be redo-logged because the data structure is file-based;
this patch does not fix any bug; the original erase operation was added
in r781 to fix Valgrind Bug #20791
parent dc9107df
...@@ -847,12 +847,6 @@ trx_sysf_create( ...@@ -847,12 +847,6 @@ trx_sysf_create(
mtr); mtr);
ut_a(buf_frame_get_page_no(page) == TRX_SYS_PAGE_NO); ut_a(buf_frame_get_page_no(page) == TRX_SYS_PAGE_NO);
/* Reset the doublewrite buffer magic number to zero so that we
know that the doublewrite buffer has not yet been created (this
suppresses a Valgrind warning) */
mach_write_to_4(page + TRX_SYS_DOUBLEWRITE + TRX_SYS_DOUBLEWRITE_MAGIC,
0);
#ifdef UNIV_SYNC_DEBUG #ifdef UNIV_SYNC_DEBUG
buf_page_dbg_add_level(page, SYNC_TRX_SYS_HEADER); buf_page_dbg_add_level(page, SYNC_TRX_SYS_HEADER);
#endif /* UNIV_SYNC_DEBUG */ #endif /* UNIV_SYNC_DEBUG */
...@@ -860,6 +854,13 @@ trx_sysf_create( ...@@ -860,6 +854,13 @@ trx_sysf_create(
mlog_write_ulint(page + FIL_PAGE_TYPE, FIL_PAGE_TYPE_TRX_SYS, mlog_write_ulint(page + FIL_PAGE_TYPE, FIL_PAGE_TYPE_TRX_SYS,
MLOG_2BYTES, mtr); MLOG_2BYTES, mtr);
/* Reset the doublewrite buffer magic number to zero so that we
know that the doublewrite buffer has not yet been created (this
suppresses a Valgrind warning) */
mlog_write_ulint(page + TRX_SYS_DOUBLEWRITE
+ TRX_SYS_DOUBLEWRITE_MAGIC, 0, MLOG_4BYTES, mtr);
sys_header = trx_sysf_get(mtr); sys_header = trx_sysf_get(mtr);
/* Start counting transaction ids from number 1 up */ /* Start counting transaction ids from number 1 up */
......
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