Commit 375991a5 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-26827 fixup for DDL race condition

buf_flush_try_neighbors(): Tolerate count<2 in case the tablespace
is being dropped.
parent 31536b24
......@@ -1122,13 +1122,11 @@ static ulint buf_flush_try_neighbors(fil_space_t *space,
mysql_mutex_unlock(&buf_pool.mutex);
}
ut_ad(!bpage);
if (auto n= count - 1)
if (count > 1)
{
MONITOR_INC_VALUE_CUMULATIVE(MONITOR_FLUSH_NEIGHBOR_TOTAL_PAGE,
MONITOR_FLUSH_NEIGHBOR_COUNT,
MONITOR_FLUSH_NEIGHBOR_PAGES, n);
MONITOR_FLUSH_NEIGHBOR_PAGES, count - 1);
}
return count;
......
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