mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 14:02:32 +01:00
branches/zip: buf_page_init_for_read(): IO-fix the block during
buf_zip_decompress(). This will prevent btr_cur_search_to_nth_level() from accessing a half-decompressed leaf page. Internal B-tree nodes (non-leaf pages) in B-tree searches are only protected by the tree latch (index->lock) and by buffer-fixing.
This commit is contained in:
parent
ccd2090964
commit
8efb68f1c9
1 changed files with 4 additions and 0 deletions
|
@ -2180,6 +2180,7 @@ buf_page_init_for_read(
|
|||
block->page.state = BUF_BLOCK_FILE_PAGE;
|
||||
ut_a(!block->page.buf_fix_count);
|
||||
block->page.buf_fix_count++;;
|
||||
buf_block_set_io_fix(block, BUF_IO_READ);
|
||||
rw_lock_x_lock(&block->lock);
|
||||
mutex_exit(&block->mutex);
|
||||
mutex_exit(&buf_pool->zip_mutex);
|
||||
|
@ -2194,8 +2195,11 @@ buf_page_init_for_read(
|
|||
}
|
||||
|
||||
buf_zip_decompress(block, srv_use_checksums);
|
||||
mutex_enter(&buf_pool->mutex);
|
||||
mutex_enter(&block->mutex);
|
||||
block->page.buf_fix_count--;
|
||||
buf_block_set_io_fix(block, BUF_IO_NONE);
|
||||
mutex_exit(&buf_pool->mutex);
|
||||
mutex_exit(&block->mutex);
|
||||
rw_lock_x_unlock(&block->lock);
|
||||
|
||||
|
|
Loading…
Reference in a new issue