1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fix for Bug#35074: max_used_connections is not correct.

The problem was that number of threads was used to calculate
max_used_connections.

The fix is to use number of active connections.
This commit is contained in:
anozdrin/alik@quad.
2008-03-13 12:02:12 +03:00
parent 18125abf93
commit 5c1e58d4fa
3 changed files with 112 additions and 3 deletions

View File

@@ -4776,6 +4776,9 @@ static void create_new_thread(THD *thd)
++connection_count;
if (connection_count > max_used_connections)
max_used_connections= connection_count;
pthread_mutex_unlock(&LOCK_connection_count);
/* Start a new thread to handle connection. */
@@ -4791,9 +4794,6 @@ static void create_new_thread(THD *thd)
thread_count++;
if (thread_count - delayed_insert_threads > max_used_connections)
max_used_connections= thread_count - delayed_insert_threads;
thread_scheduler.add_connection(thd);
DBUG_VOID_RETURN;