mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-28828 SIGSEGV in buf_flush_LRU_list_batch
In commit 73fee39ea6 (MDEV-27985)
a regression was introduced that would cause bpage=nullptr to
be referenced.
buf_flush_LRU_list_batch(): Always terminate the loop upon
encountering a null pointer.
This commit is contained in:
@@ -1294,7 +1294,6 @@ static void buf_flush_LRU_list_batch(ulint max, flush_counters_t *n)
|
||||
n->flushed + n->evicted < max) ||
|
||||
recv_recovery_is_on()); ++scanned)
|
||||
{
|
||||
retry:
|
||||
buf_page_t *prev= UT_LIST_GET_PREV(LRU, bpage);
|
||||
const lsn_t oldest_modification= bpage->oldest_modification();
|
||||
buf_pool.lru_hp.set(prev);
|
||||
@@ -1326,7 +1325,6 @@ static void buf_flush_LRU_list_batch(ulint max, flush_counters_t *n)
|
||||
mysql_mutex_lock(&buf_pool.mutex);
|
||||
if (p.second)
|
||||
buf_pool.stat.n_pages_written+= p.second;
|
||||
bpage= buf_pool.lru_hp.get();
|
||||
goto retry;
|
||||
}
|
||||
else
|
||||
@@ -1357,6 +1355,7 @@ reacquire_mutex:
|
||||
else
|
||||
/* Can't evict or dispatch this block. Go to previous. */
|
||||
ut_ad(buf_pool.lru_hp.is_hp(prev));
|
||||
retry:
|
||||
bpage= buf_pool.lru_hp.get();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user