summaryrefslogtreecommitdiff
path: root/sql/sql_plugin.h
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2006-01-07 14:41:57 +0100
committerunknown <serg@serg.mylan>2006-01-07 14:41:57 +0100
commit031ee043fb88f033c430df1c3c1890f8ea40d7e8 (patch)
tree8e78176cd0cc3972339c3fdd16ca56c31ab3bcdb /sql/sql_plugin.h
parent88469c807ea8e4a7a45a4e47604f45c211a34d11 (diff)
downloadmariadb-git-031ee043fb88f033c430df1c3c1890f8ea40d7e8.tar.gz
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. include/plugin.h: WL#2935 - SHOW STATUS support in plugins plugin/fulltext/plugin_example.c: WL#2935 - SHOW STATUS support in plugins example sql/ha_innodb.cc: s/struct show_var_st/SHOW_VAR/ sql/ha_innodb.h: s/struct show_var_st/SHOW_VAR/ sql/mysql_priv.h: WL#2935 - SHOW STATUS support in plugins add_status_vars(), remove_status_vars() sql/mysqld.cc: bug: plugin_free must be called even with --skip-grants add_status_vars()/free_status_vars(), remove unused SHOW_xxx_CONST s/struct show_var_st/SHOW_VAR/ sql/set_var.cc: s/struct show_var_st/SHOW_VAR/ sql/sql_parse.cc: s/struct show_var_st/SHOW_VAR/ sql/sql_plugin.cc: WL#2935 - SHOW STATUS support in plugins sql/sql_plugin.h: WL#2935 - SHOW STATUS support in plugins sql/sql_show.cc: WL#2935 - SHOW STATUS support in plugins DYNAMIC_ARRAY all_status_vars, add_status_vars(), remove_status_vars() s/struct show_var_st/SHOW_VAR/ sql/structs.h: WL#2935 - SHOW STATUS support in plugins SHOW STATUS definitions moved to include/plugin.h and sql_plugin.h s/struct show_var_st/SHOW_VAR/
Diffstat (limited to 'sql/sql_plugin.h')
-rw-r--r--sql/sql_plugin.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sql/sql_plugin.h b/sql/sql_plugin.h
index f0b70ca9d26..ce06334ffd7 100644
--- a/sql/sql_plugin.h
+++ b/sql/sql_plugin.h
@@ -17,7 +17,17 @@
#ifndef _sql_plugin_h
#define _sql_plugin_h
+/*
+ the following #define adds server-only members to enum_mysql_show_type,
+ that is defined in plugin.h
+*/
+#define SHOW_FUNC SHOW_FUNC, SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_LONGLONG, \
+ SHOW_LONG_STATUS, SHOW_DOUBLE_STATUS, SHOW_HAVE, \
+ SHOW_HA_ROWS, SHOW_SYS, SHOW_LONG_NOFLUSH
#include <plugin.h>
+#undef SHOW_FUNC
+typedef enum enum_mysql_show_type SHOW_TYPE;
+typedef struct st_mysql_show_var SHOW_VAR;
#define MYSQL_ANY_PLUGIN -1
@@ -65,7 +75,7 @@ extern my_bool mysql_uninstall_plugin(THD *thd, LEX_STRING *name);
extern my_bool plugin_register_builtin(struct st_mysql_plugin *plugin);
-typedef my_bool (plugin_foreach_func)(THD *thd,
+typedef my_bool (plugin_foreach_func)(THD *thd,
st_plugin_int *plugin,
void *arg);
extern my_bool plugin_foreach(THD *thd, plugin_foreach_func *func,