diff options
Diffstat (limited to 'sql/threadpool_common.cc')
-rw-r--r-- | sql/threadpool_common.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc index 730ea2bd365..e3f968003b7 100644 --- a/sql/threadpool_common.cc +++ b/sql/threadpool_common.cc @@ -351,11 +351,18 @@ static bool tp_init() #ifdef _WIN32 pool = new (std::nothrow) TP_pool_win; - return 0; #else pool= new (std::nothrow) TP_pool_unix; - return 0; #endif + if (!pool) + return true; + if (pool->init()) + { + delete pool; + pool= 0; + return true; + } + return false; } static void tp_add_connection(CONNECT *connect) |