Commit 7e65e302 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-33275 buf_flush_LRU(): mysql_mutex_assert_owner(&buf_pool.mutex) failed

In commit a55b951e (MDEV-26827)
an error was introduced in a rarely executed code path of the
buf_flush_page_cleaner() thread. As a result, the function
buf_flush_LRU() could be invoked while not holding buf_pool.mutex.

Reviewed by: Debarun Banerjee
parent d34479dc
......@@ -2547,6 +2547,8 @@ static void buf_flush_page_cleaner()
else if (buf_flush_async_lsn <= oldest_lsn &&
!buf_pool.need_LRU_eviction())
goto check_oldest_and_set_idle;
else
mysql_mutex_lock(&buf_pool.mutex);
n= srv_max_io_capacity;
n= n >= n_flushed ? n - n_flushed : 0;
......
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