1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +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

@@ -1263,6 +1263,7 @@ void THD::init(void)
bzero((char *) &status_var, sizeof(status_var));
bzero((char *) &org_status_var, sizeof(org_status_var));
start_bytes_received= 0;
status_in_global= 0;
if (variables.sql_log_bin)
variables.option_bits|= OPTION_BIN_LOG;
@@ -1366,6 +1367,7 @@ void THD::change_user(void)
cleanup();
reset_killed();
cleanup_done= 0;
status_in_global= 0;
init();
stmt_map.reset();
my_hash_init(&user_vars, system_charset_info, USER_VARS_HASH_SIZE, 0, 0,