summaryrefslogtreecommitdiff
path: root/sql/threadpool_common.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2019-05-19 17:00:31 +0400
committerSergey Vojtovich <svoj@mariadb.org>2019-05-21 17:55:09 +0400
commita61baa7a2573719116d07812f274957590c4cb6b (patch)
tree318edd871acf13cdd5abbb279a8066bc280a88af /sql/threadpool_common.cc
parent0bee021b78af8d45b2510a79244b9925032c4765 (diff)
downloadmariadb-git-a61baa7a2573719116d07812f274957590c4cb6b.tar.gz
Maintain connection_count atomically
Removed LOCK_connection_count. Removed duplicate denied_connections and connection_errors_max_connection increment from create_new_thread(). Another increment done by CONNECT::close_with_error(). Simplified away CONNECT::thread_count_incremented. Now close_with_error() is always called with connection_count incremented. Part of MDEV-19515 - Improve connect speed
Diffstat (limited to 'sql/threadpool_common.cc')
-rw-r--r--sql/threadpool_common.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc
index 66f7a94d528..06b74cfe1a6 100644
--- a/sql/threadpool_common.cc
+++ b/sql/threadpool_common.cc
@@ -508,7 +508,7 @@ static scheduler_functions tp_scheduler_functions=
void pool_of_threads_scheduler(struct scheduler_functions *func,
ulong *arg_max_connections,
- uint *arg_connection_count)
+ Atomic_counter<uint> *arg_connection_count)
{
*func = tp_scheduler_functions;
func->max_threads= threadpool_max_threads;