mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge of fix for BUG#4258 from 4.1.
Needs additional manual merge.
This commit is contained in:
@ -5867,6 +5867,7 @@ void kill_one_thread(THD *thd, ulong id, bool only_kill_query)
|
||||
my_error(error, MYF(0), id);
|
||||
}
|
||||
|
||||
|
||||
/* Clear most status variables */
|
||||
|
||||
static void refresh_status(void)
|
||||
@ -5876,17 +5877,6 @@ static void refresh_status(void)
|
||||
{
|
||||
if (ptr->type == SHOW_LONG)
|
||||
*(ulong*) ptr->value= 0;
|
||||
else if (ptr->type == SHOW_KEY_CACHE_LONG)
|
||||
{
|
||||
/*
|
||||
Reset value in 'default' key cache.
|
||||
This needs to be recoded when we have thread specific key values
|
||||
*/
|
||||
char *value= (((char*) sql_key_cache) +
|
||||
(uint) ((char*) (ptr->value) -
|
||||
(char*) &dflt_key_cache_var));
|
||||
*(ulong*) value= 0;
|
||||
}
|
||||
else if (ptr->type == SHOW_LONG_STATUS)
|
||||
{
|
||||
THD *thd= current_thd;
|
||||
@ -5895,6 +5885,8 @@ static void refresh_status(void)
|
||||
bzero((char*) &thd->status_var, sizeof(thd->status_var));
|
||||
}
|
||||
}
|
||||
/* Reset the counters of all key caches (default and named). */
|
||||
process_key_caches(reset_key_cache_counters);
|
||||
pthread_mutex_unlock(&LOCK_status);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user