Commit 40ae9c5d authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.5 into 10.6

parents cacd8f5a eb2f2c1e
......@@ -192,16 +192,18 @@ extern "C" sig_handler handle_fatal_signal(int sig)
if (dflt_key_cache && thread_scheduler)
{
size_t used_mem=
(dflt_key_cache->key_cache_mem_size +
(global_system_variables.read_buff_size +
(size_t) global_system_variables.sortbuff_size) *
(thread_scheduler->max_threads + extra_max_connections) +
(max_connections + extra_max_connections) * sizeof(THD)) / 1024;
my_safe_printf_stderr("It is possible that mysqld could use up to \n"
"key_buffer_size + "
"(read_buffer_size + sort_buffer_size)*max_threads = "
"%zu K bytes of memory\n",
(dflt_key_cache->key_cache_mem_size +
(global_system_variables.read_buff_size +
(size_t)global_system_variables.sortbuff_size) *
(thread_scheduler->max_threads + extra_max_connections) +
(max_connections + extra_max_connections) *
sizeof(THD)) / 1024);
"%zu K bytes of memory\n", used_mem);
my_safe_printf_stderr("%s",
"Hope that's ok; if not, decrease some variables in "
"the equation.\n\n");
......
......@@ -721,6 +721,10 @@ buf_load()
ut_free(dump);
if (i == dump_n) {
os_aio_wait_until_no_pending_reads();
}
ut_sprintf_timestamp(now);
if (i == dump_n) {
......
......@@ -3817,7 +3817,15 @@ void os_aio_wait_until_no_pending_writes()
/** Wait until all pending asynchronous reads have completed. */
void os_aio_wait_until_no_pending_reads()
{
const auto notify_wait= read_slots->pending_io_count();
if (notify_wait)
tpool::tpool_wait_begin();
read_slots->wait();
if (notify_wait)
tpool::tpool_wait_end();
}
/** Request a read or write.
......
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