Skip to content

Commit

Permalink
MDEV-33332 SIGSEGV in buf_read_ahead_linear() when bpage is in buf_po…
Browse files Browse the repository at this point in the history
…ol.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.
  • Loading branch information
dr-m committed Feb 13, 2024
1 parent d86deee commit 68d9deb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/innobase/buf/buf0rea.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 68d9deb

Please sign in to comment.