Commit 68d9deb6 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-33332 SIGSEGV in buf_read_ahead_linear() when bpage is in buf_pool.watch

buf_read_ahead_linear(): If buf_pool.watch_is_sentinel(*bpage),
do not attempt to read the page frame because the pointer would be null
for the elements of buf_pool.watch[].

Hitting this bug requires the use of a non-default value of
innodb_change_buffering.
parent d86deee3
......@@ -623,7 +623,7 @@ buf_read_ahead_linear(const page_id_t page_id, ulint zip_size, bool ibuf)
on the page, we do not acquire an s-latch on the page, this is to
prevent deadlocks. The hash_lock is only protecting the
buf_pool.page_hash for page i, not the bpage contents itself. */
if (!bpage)
if (!bpage || buf_pool.watch_is_sentinel(*bpage))
{
hard_fail:
hash_lock->read_unlock();
......
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