mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 11:31:51 +01:00
branches/zip: fil_create_new_single_table_tablespace(): Remove the
unnecessary memset() introduced in r852. When zip_size != 0, write the compressed page to disk, not the uncompressed one.
This commit is contained in:
parent
83ef74df8b
commit
8325ef9b27
1 changed files with 2 additions and 3 deletions
|
@ -2655,18 +2655,17 @@ error_exit2:
|
||||||
if (!zip_size) {
|
if (!zip_size) {
|
||||||
buf_flush_init_for_writing(page, NULL,
|
buf_flush_init_for_writing(page, NULL,
|
||||||
ut_dulint_zero, *space_id, 0);
|
ut_dulint_zero, *space_id, 0);
|
||||||
|
ret = os_file_write(path, file, page, 0, 0, UNIV_PAGE_SIZE);
|
||||||
} else {
|
} else {
|
||||||
page_zip_des_t page_zip;
|
page_zip_des_t page_zip;
|
||||||
page_zip.size = zip_size;
|
page_zip.size = zip_size;
|
||||||
page_zip.data = page + UNIV_PAGE_SIZE;
|
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;
|
page_zip.n_blobs = page_zip.m_start = page_zip.m_end = 0;
|
||||||
buf_flush_init_for_writing(page, &page_zip,
|
buf_flush_init_for_writing(page, &page_zip,
|
||||||
ut_dulint_zero, *space_id, 0);
|
ut_dulint_zero, *space_id, 0);
|
||||||
|
ret = os_file_write(path, file, page_zip.data, 0, 0, zip_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = os_file_write(path, file, page, 0, 0, UNIV_PAGE_SIZE);
|
|
||||||
|
|
||||||
ut_free(buf2);
|
ut_free(buf2);
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue