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:
@ -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;
|
||||
|
Reference in New Issue
Block a user