Commit a169d0ec authored by marko's avatar marko

branches/zip: fil_create_new_single_table_tablespace():

Make page_zip->data point to an address different from page,
to avoid calling memcpy() with overlapping source and destination.
parent 2af802d8
......@@ -2607,7 +2607,7 @@ fil_create_new_single_table_tablespace(
return(DB_ERROR);
}
buf2 = ut_malloc(2 * UNIV_PAGE_SIZE);
buf2 = ut_malloc(2 * UNIV_PAGE_SIZE + zip_size);
/* Align the memory for file i/o if we might have O_DIRECT set */
page = ut_align(buf2, UNIV_PAGE_SIZE);
......@@ -2658,7 +2658,8 @@ fil_create_new_single_table_tablespace(
} else {
page_zip_des_t page_zip;
page_zip.size = zip_size;
page_zip.data = page;
page_zip.data = page + UNIV_PAGE_SIZE;
memset(page_zip.data, 0, zip_size);
page_zip.n_blobs = page_zip.m_start = page_zip.m_end = 0;
buf_flush_init_for_writing(page, &page_zip,
ut_dulint_zero, *space_id, 0);
......
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