Commit 4fa18d52 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-15524 Do not write garbage for temporary tables

fsp_init_file_page_low(): Always initialize the page.
parent 1e4cb840
......@@ -600,17 +600,14 @@ fsp_init_file_page_low(
buf_block_t* block) /*!< in: pointer to a page */
{
page_t* page = buf_block_get_frame(block);
page_zip_des_t* page_zip= buf_block_get_page_zip(block);
if (!fsp_is_system_temporary(block->page.id.space())) {
memset(page, 0, UNIV_PAGE_SIZE);
}
memset(page, 0, UNIV_PAGE_SIZE);
mach_write_to_4(page + FIL_PAGE_OFFSET, block->page.id.page_no());
mach_write_to_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID,
block->page.id.space());
if (page_zip) {
if (page_zip_des_t* page_zip= buf_block_get_page_zip(block)) {
memset(page_zip->data, 0, page_zip_get_size(page_zip));
memcpy(page_zip->data + FIL_PAGE_OFFSET,
page + FIL_PAGE_OFFSET, 4);
......
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