summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-11-17 13:13:47 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-11-23 13:40:37 +0400
commitf00d7657f8abf9d080c9c54e4d6057ed075b9eb9 (patch)
treec62932127d02354935c466acf006ef773426d2a4 /sql
parent370a2cbe96e026fdb8966d8e58e7c93f75597cb8 (diff)
downloadmariadb-git-f00d7657f8abf9d080c9c54e4d6057ed075b9eb9.tar.gz
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().
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 9dcf87adecb..bdd6495015e 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -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))
{