Commit f00d7657 authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-7806 - thread_pool_size is not auto-sized

thread_pool_size is auto-sized before my_getopt(). But my_getopt starts from
resetting all options to their default values. So the auto-sized value is lost.

Fixed by moving thread_pool_size auto-sizing after my_getopt().
parent 370a2cbe
......@@ -4111,10 +4111,6 @@ static int init_common_variables()
return 1;
}
#if defined(HAVE_POOL_OF_THREADS) && !defined(_WIN32)
SYSVAR_AUTOSIZE(threadpool_size, my_getncpus());
#endif
if (init_thread_environment() ||
mysql_init_variables())
return 1;
......@@ -4344,6 +4340,11 @@ static int init_common_variables()
#endif /* HAVE_SOLARIS_LARGE_PAGES */
#if defined(HAVE_POOL_OF_THREADS) && !defined(_WIN32)
if (IS_SYSVAR_AUTOSIZE(&threadpool_size))
SYSVAR_AUTOSIZE(threadpool_size, my_getncpus());
#endif
/* Fix host_cache_size. */
if (IS_SYSVAR_AUTOSIZE(&host_cache_size))
{
......
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