Commit 020b6035 authored by marko's avatar marko

branches/zip: buf_page_init_for_read(): Increment the buf_fix_count

during the buf_zip_decompress() call.  Otherwise, the block may end
up being freed by another thread.  This bug was caught by the
page_zip_validate() check in buf_LRU_block_remove_hashed_page().
parent 1f7bc8e2
......@@ -2161,6 +2161,8 @@ buf_page_init_for_read(
}
}
ut_a(!block->page.buf_fix_count);
block->page.buf_fix_count++;;
rw_lock_x_lock(&block->lock);
mutex_exit(&block->mutex);
mutex_exit(&buf_pool->zip_mutex);
......@@ -2175,6 +2177,9 @@ buf_page_init_for_read(
}
buf_zip_decompress(block, srv_use_checksums);
mutex_enter(&block->mutex);
block->page.buf_fix_count--;
mutex_exit(&block->mutex);
rw_lock_x_unlock(&block->lock);
return(NULL);
......
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