MDEV-27322 Test innodb.doublewrite crashes when using innodb_flush_method=O_DIRECT

 - 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().
parent 32692140
......@@ -836,13 +836,16 @@ static struct
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;
......
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