Commit 601eb411 authored by Marko Mäkelä's avatar Marko Mäkelä

Cleanup: deduplicate code

parent 5bd51725
...@@ -2361,14 +2361,8 @@ void buf_flush_sync() ...@@ -2361,14 +2361,8 @@ void buf_flush_sync()
{ {
const ulint n_flushed= buf_flush_lists(srv_max_io_capacity, LSN_MAX); const ulint n_flushed= buf_flush_lists(srv_max_io_capacity, LSN_MAX);
buf_flush_wait_batch_end_acquiring_mutex(false); buf_flush_wait_batch_end_acquiring_mutex(false);
if (!n_flushed) if (!n_flushed && !buf_flush_list_length())
{ return;
mysql_mutex_lock(&buf_pool.flush_list_mutex);
const auto len= UT_LIST_GET_LEN(buf_pool.flush_list);
mysql_mutex_unlock(&buf_pool.flush_list_mutex);
if (!len)
return;
}
} }
} }
......
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