[Commits] bff67808: MDEV-7806 - thread_pool_size is not auto-sized

Sergey Vojtovich svoj at mariadb.org
Tue Nov 17 17:33:34 EET 2015


revision-id: bff6780806f4afed8faaf4c79b1593964564097e (mariadb-10.1.8-66-gbff67808)
parent(s): c0216f1d02e63686f986fa8f352fdf6de61249a7
committer: Sergey Vojtovich
timestamp: 2015-11-17 19:33:01 +0400
message:

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().

---
 sql/mysqld.cc | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index f9a3c2a..553951e 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))
   {


More information about the commits mailing list