1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

WL#2935 - SHOW STATUS support in plugins

The patch adds DYNAMIC_ARRAY all_status_vars, which is now the
sole source of status information for SHOW STATUS.  Status
variables can be added to and removed from the array dynamically.
SHOW STATUS command uses this array instead of static array
from mysqld.cc
Compatibility with the old, global list of status variables is
preserved in init_server_components(), where this global list is
simply appended to all_status_vars.
This commit is contained in:
serg@serg.mylan
2006-01-07 14:41:57 +01:00
parent 8241a5a8e8
commit cfbaad9952
12 changed files with 395 additions and 194 deletions

View File

@@ -6641,7 +6641,7 @@ void kill_one_thread(THD *thd, ulong id, bool only_kill_query)
static void refresh_status(void)
{
pthread_mutex_lock(&LOCK_status);
for (struct show_var_st *ptr=status_vars; ptr->name; ptr++)
for (SHOW_VAR *ptr= status_vars; ptr->name; ptr++)
if (ptr->type == SHOW_LONG) // note that SHOW_LONG_NOFLUSH variables are not reset
*(ulong*) ptr->value= 0;