Commit 8b2766af authored by marko's avatar marko

branches/zip: Make Valgrind diagnostics more accurate.

buf_page_init(): Declare block->frame valid only in the system tablespace.

trx_sysf_create(): Declare the rest of the page valid, although it is
uninitialized.
parent b91b8f49
...@@ -1939,10 +1939,15 @@ buf_page_init( ...@@ -1939,10 +1939,15 @@ buf_page_init(
/* Set the state of the block */ /* Set the state of the block */
buf_block_set_file_page(block, space, offset); buf_block_set_file_page(block, space, offset);
#ifdef UNIV_DEBUG_VALGRIND
if (!space) {
/* Silence valid Valgrind warnings about uninitialized /* Silence valid Valgrind warnings about uninitialized
data being written to data files. There are some unused data being written to data files. There are some unused
bytes on some pages that InnoDB does not initialize. */ bytes on some pages that InnoDB does not initialize. */
UNIV_MEM_VALID(block->frame, UNIV_PAGE_SIZE); UNIV_MEM_VALID(block->frame, UNIV_PAGE_SIZE);
}
#endif /* UNIV_DEBUG_VALGRIND */
block->check_index_page_at_flush = FALSE; block->check_index_page_at_flush = FALSE;
block->index = NULL; block->index = NULL;
......
...@@ -885,7 +885,16 @@ trx_sysf_create( ...@@ -885,7 +885,16 @@ trx_sysf_create(
trx_sysf_rseg_set_page_no(sys_header, i, FIL_NULL, mtr); trx_sysf_rseg_set_page_no(sys_header, i, FIL_NULL, mtr);
} }
/* The remaining area (up to the page trailer) is uninitialized. */ /* The remaining area (up to the page trailer) is uninitialized.
Silence Valgrind warnings about it. */
UNIV_MEM_VALID(sys_header + (TRX_SYS_RSEGS
+ TRX_SYS_N_RSEGS * TRX_SYS_RSEG_SLOT_SIZE
+ TRX_SYS_RSEG_SPACE),
(UNIV_PAGE_SIZE - FIL_PAGE_DATA_END
- (TRX_SYS_RSEGS
+ TRX_SYS_N_RSEGS * TRX_SYS_RSEG_SLOT_SIZE
+ TRX_SYS_RSEG_SPACE))
+ page - sys_header);
/* Create the first rollback segment in the SYSTEM tablespace */ /* Create the first rollback segment in the SYSTEM tablespace */
page_no = trx_rseg_header_create(TRX_SYS_SPACE, ULINT_MAX, &slot_no, page_no = trx_rseg_header_create(TRX_SYS_SPACE, ULINT_MAX, &slot_no,
......
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