MySQL  8.0.21
Source Code Documentation
component_status_var_service.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
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 COMPONENT_STATUS_VAR_SERVICE_H
24 #define COMPONENT_STATUS_VAR_SERVICE_H
25 
27 #include <mysql/status_var.h>
28 
29 /**
30  Component status variables as a service to mysql_server component
31 */
32 
33 struct SHOW_VAR;
34 
35 /**
36  Service to register variable and unregister variable.
37 */
38 BEGIN_SERVICE_DEFINITION(status_variable_registration)
39 
40 /**
41  Register status variable.
42 
43  @param status_var fully constructed status variable object.
44  @return Status of performed operation
45  @retval false success
46  @retval true failure
47 
48  Note: Please see the components/test/test_status_var_service.cc file,
49  to know how to construct status varables for different variable types.
50 */
51 DECLARE_BOOL_METHOD(register_variable, (SHOW_VAR * status_var));
52 
53 /**
54  Unregister's status variable.
55  @param status_var SHOW_VAR object with only the name of the variable,
56  which has to be removed from the global list.
57  @return Status of performed operation
58  @retval false success
59  @retval true failure
60 */
61 DECLARE_BOOL_METHOD(unregister_variable, (SHOW_VAR * status_var));
62 
63 END_SERVICE_DEFINITION(status_variable_registration)
64 
65 #endif /* COMPONENT_STATUS_VAR_SERVICE_H */
SHOW STATUS Server status variable.
Definition: status_var.h:78
#define END_SERVICE_DEFINITION(name)
#define BEGIN_SERVICE_DEFINITION(name)
#define DECLARE_BOOL_METHOD(name, args)