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