Commit 6dc037a9 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-23399 fixup: Remove double-free of a buffer page

In commit 7cffb5f6 we changed the
interface of buf_page_create() so that the free_block is allocated
by the caller. Both calls to buf_LRU_block_free_non_file_page()
should have been removed.

This caused an assertion failure 'block->page.state() == BUF_BLOCK_MEMORY'
in buf_LRU_block_free_non_file_page().

The bug only affected ROW_FORMAT=COMPRESSED pages.
parent bdbec5a2
...@@ -3827,7 +3827,6 @@ buf_page_create(fil_space_t *space, uint32_t offset, ...@@ -3827,7 +3827,6 @@ buf_page_create(fil_space_t *space, uint32_t offset,
if (block->page.io_fix() != BUF_IO_NONE) if (block->page.io_fix() != BUF_IO_NONE)
{ {
hash_lock->write_unlock(); hash_lock->write_unlock();
buf_LRU_block_free_non_file_page(free_block);
mysql_mutex_unlock(&buf_pool.mutex); mysql_mutex_unlock(&buf_pool.mutex);
goto loop; goto loop;
} }
......
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