diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-12-21 12:26:03 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2021-12-21 16:40:25 +0530 |
commit | 8e5f09a6ed15cda6a413c59b84999d91e8eafb76 (patch) | |
tree | 00dd3e75430125e48522466ae1d6f156e81c7964 /storage/innobase | |
parent | 32692140e1a4f9aa87359f3ef6efe4a615119e71 (diff) | |
download | mariadb-git-8e5f09a6ed15cda6a413c59b84999d91e8eafb76.tar.gz |
MDEV-27322 Test innodb.doublewrite crashes when using innodb_flush_method=O_DIRECTbb-10.6-MDEV-27322
- InnoDB fails to write the page0 while trying to attempt recover
the page0 from doublewrite buffer and incorrect size is being passed
to the os_file_write(). Fix is that InnoDB should
proper close the parenthesis for function os_file_write() in
deferred_dblwr() and InnoDB should free the newly created tablespace
in case of error in deferred_dblwr().
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/log/log0recv.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index dd3ce42c794..674dee0a49e 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -836,13 +836,16 @@ processed: space->free_len= flst_get_len(FSP_HEADER_OFFSET + FSP_FREE + page); fil_node_t *node= UT_LIST_GET_FIRST(space->chain); if (!space->acquire()) + { +free_space: + fil_space_free(it->first, false); goto next_item; + } if (os_file_write(IORequestWrite, node->name, node->handle, - page, 0, fil_space_t::physical_size(flags) != - DB_SUCCESS)) + page, 0, fil_space_t::physical_size(flags)) != DB_SUCCESS) { space->release(); - goto next_item; + goto free_space; } space->release(); it->second.space= space; |