MySQL  8.0.27
Source Code Documentation
status_var.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, 2021, Oracle and/or its affiliates.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef status_var_h
24 #define status_var_h
25 
26 /**
27  Declarations for SHOW STATUS support in plugins
28 */
32  SHOW_INT, ///< shown as _unsigned_ int
33  SHOW_LONG, ///< shown as _unsigned_ long
34  SHOW_LONGLONG, ///< shown as _unsigned_ longlong
40  /*
41  This include defines server-only values of the enum.
42  Using them in plugins is not supported.
43  */
55  /*
56  Support for signed values are extended for plugins.
57  */
61 };
62 
63 /**
64  Status variable scope.
65  Only GLOBAL status variable scope is available in plugins.
66 */
70  /* Server-only values. Not supported in plugins. */
73 };
74 
75 /**
76  SHOW STATUS Server status variable
77 */
78 struct SHOW_VAR {
79  const char *name;
80  char *value;
83 };
84 
85 #define SHOW_VAR_MAX_NAME_LEN 64
86 #define SHOW_VAR_FUNC_BUFF_SIZE 1024
87 #ifdef __cplusplus
88 class THD;
89 #define MYSQL_THD THD *
90 #else
91 #define MYSQL_THD void *
92 #endif
93 typedef int (*mysql_show_var_func)(MYSQL_THD, SHOW_VAR *, char *);
94 
95 #endif
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_class.h:821
#define MYSQL_THD
Definition: status_var.h:89
enum_mysql_show_type
Declarations for SHOW STATUS support in plugins.
Definition: status_var.h:29
@ SHOW_DOUBLE
Definition: status_var.h:39
@ SHOW_LONG
shown as unsigned long
Definition: status_var.h:33
@ SHOW_ARRAY
Definition: status_var.h:37
@ SHOW_FUNC
Definition: status_var.h:38
@ SHOW_CHAR_PTR
Definition: status_var.h:36
@ SHOW_KEY_CACHE_LONGLONG
Definition: status_var.h:45
@ SHOW_MY_BOOL
Definition: status_var.h:49
@ SHOW_CHAR
Definition: status_var.h:35
@ SHOW_LONGLONG_STATUS
Definition: status_var.h:53
@ SHOW_SIGNED_INT
Definition: status_var.h:58
@ SHOW_LEX_STRING
Definition: status_var.h:54
@ SHOW_KEY_CACHE_LONG
Definition: status_var.h:44
@ SHOW_LONG_STATUS
Definition: status_var.h:46
@ SHOW_HAVE
Definition: status_var.h:48
@ SHOW_BOOL
Definition: status_var.h:31
@ SHOW_LONG_NOFLUSH
Definition: status_var.h:52
@ SHOW_DOUBLE_STATUS
Definition: status_var.h:47
@ SHOW_HA_ROWS
Definition: status_var.h:50
@ SHOW_LONGLONG
shown as unsigned longlong
Definition: status_var.h:34
@ SHOW_INT
shown as unsigned int
Definition: status_var.h:32
@ SHOW_SYS
Definition: status_var.h:51
@ SHOW_UNDEF
Definition: status_var.h:30
@ SHOW_SIGNED_LONG
Definition: status_var.h:59
@ SHOW_SIGNED_LONGLONG
Definition: status_var.h:60
int(* mysql_show_var_func)(MYSQL_THD, SHOW_VAR *, char *)
Definition: status_var.h:93
enum_mysql_show_scope
Status variable scope.
Definition: status_var.h:67
@ SHOW_SCOPE_GLOBAL
Definition: status_var.h:69
@ SHOW_SCOPE_SESSION
Definition: status_var.h:71
@ SHOW_SCOPE_ALL
Definition: status_var.h:72
@ SHOW_SCOPE_UNDEF
Definition: status_var.h:68
SHOW STATUS Server status variable.
Definition: status_var.h:78
enum enum_mysql_show_scope scope
Definition: status_var.h:82
char * value
Definition: status_var.h:80
enum enum_mysql_show_type type
Definition: status_var.h:81
const char * name
Definition: status_var.h:79