1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for MDEV-8301; Statistics for a thread could be counted twice in SHOW STATUS while thread was ending

Fixed by adding a marker if we have added the thread statistics to the global counters.
This commit is contained in:
Monty
2015-06-26 14:48:22 +03:00
parent 67c56ab1e4
commit bc300464f1
3 changed files with 14 additions and 4 deletions

View File

@ -3109,7 +3109,10 @@ void calc_sum_of_all_status(STATUS_VAR *to)
/* Add to this status from existing threads */
while ((tmp= it++))
add_to_status(to, &tmp->status_var);
{
if (!tmp->status_in_global)
add_to_status(to, &tmp->status_var);
}
mysql_mutex_unlock(&LOCK_thread_count);
DBUG_VOID_RETURN;