1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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.


mysql-test/r/connect.result:
  Update result file.
mysql-test/t/connect.test:
  - Add a test case for Bug#35074: max_used_connections is not correct;
  - Make a test case for Bug#33507 more stable.
sql/mysqld.cc:
  Use number of connections insetad of threads
  to calculate max_used_connections.
This commit is contained in:
unknown
2008-03-13 12:02:12 +03:00
parent b279be388e
commit c167501bfb
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;