mirror of
https://github.com/MariaDB/server.git
synced 2026-05-08 08:04:29 +02:00
Merge of fix for BUG#4258 from 4.1.
Needs additional manual merge. mysys/mf_keycache.c: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_parse.cc: Properly resetting all key cache counters. sql/sql_show.cc: Needs manual merge.
This commit is contained in:
commit
888ee151b5
6 changed files with 49 additions and 23 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue