diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-07-20 17:35:03 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-07-20 17:35:03 +0300 |
commit | ed0a7b1b3fe6874acc5c18763b765c428709ac22 (patch) | |
tree | de2e076b4037b158a96305acf9dd26deb56225e2 /extra/mariabackup | |
parent | 68694c8ed98b0c9b1c98a11fd629d56220221152 (diff) | |
download | mariadb-git-ed0a7b1b3fe6874acc5c18763b765c428709ac22.tar.gz |
MDEV-24626 fixup: Remove useless code
fil_ibd_create(): Remove code that should have been removed in
commit 86dc7b4d4cfe15a2d37f8b5f60c4fce5dba9491d already.
We no longer wrote an initialized page to the file, but we would
still allocate a page image in memory and write it.
xb_space_create_file(): Remove an unnecessary page write.
(This is a functional change for Mariabackup.)
Diffstat (limited to 'extra/mariabackup')
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 21f27c0c8ed..0b0cd5f55e3 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -4909,53 +4909,6 @@ xb_space_create_file( return ret; } - /* Align the memory for file i/o if we might have O_DIRECT set */ - byte* page = static_cast<byte*>(aligned_malloc(2 * srv_page_size, - srv_page_size)); - - memset(page, '\0', srv_page_size); - - fsp_header_init_fields(page, space_id, flags); - mach_write_to_4(page + FIL_PAGE_ARCH_LOG_NO_OR_SPACE_ID, space_id); - - const ulint zip_size = fil_space_t::zip_size(flags); - - if (!zip_size) { - buf_flush_init_for_writing( - NULL, page, NULL, - fil_space_t::full_crc32(flags)); - - ret = os_file_write(IORequestWrite, path, *file, page, 0, - srv_page_size); - } else { - page_zip_des_t page_zip; - page_zip_set_size(&page_zip, zip_size); - page_zip.data = page + srv_page_size; - fprintf(stderr, "zip_size = " ULINTPF "\n", zip_size); - -#ifdef UNIV_DEBUG - page_zip.m_start = 0; -#endif /* UNIV_DEBUG */ - page_zip.m_end = 0; - page_zip.m_nonempty = 0; - page_zip.n_blobs = 0; - - buf_flush_init_for_writing(NULL, page, &page_zip, false); - - ret = os_file_write(IORequestWrite, path, *file, - page_zip.data, 0, zip_size); - } - - aligned_free(page); - - if (ret != DB_SUCCESS) { - msg("mariabackup: could not write the first page to %s", - path); - os_file_close(*file); - os_file_delete(0, path); - return ret; - } - return TRUE; } |