MySQL 8.3.0
Source Code Documentation
component_status_var_service_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2017, 2023, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is also distributed with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have included with MySQL.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License, version 2.0, for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef COMPONENT_STAUTS_VARIABLE_SERVICE_H
24#define COMPONENT_STAUTS_VARIABLE_SERVICE_H
25
28#include <mysql/status_var.h>
29
30extern bool add_status_vars(const SHOW_VAR *);
31extern void remove_status_vars(SHOW_VAR *);
32
33/**
34 An implementation of the component status variables Service to register
35 variable and unregister variable.
36*/
38 public:
39 /**
40 Register status variable.
41
42 @param status_var fully constructed status variable object.
43 @return Status of performed operation
44 @retval false success
45 @retval true failure
46
47 Note: Please see the components/test/test_status_var_service.cc file,
48 to know how to construct status variables for different variable types.
49 */
50 static DEFINE_BOOL_METHOD(register_variable, (SHOW_VAR * status_var));
51
52 /**
53 Unregister's status variable.
54 @param status_var SHOW_VAR object with only the name of the variable,
55 which has to be removed from the global list.
56 @return Status of performed operation
57 @retval false success
58 @retval true failure
59 */
60 static DEFINE_BOOL_METHOD(unregister_variable, (SHOW_VAR * status_var));
61};
62#endif /* COMPONENT_STATUS_VARIABLE_SERVICE_H */
An implementation of the component status variables Service to register variable and unregister varia...
Definition: component_status_var_service_imp.h:37
static mysql_service_status_t unregister_variable(SHOW_VAR *status_var) noexcept
Unregister's status variable.
Definition: component_status_var_service.cc:62
static mysql_service_status_t register_variable(SHOW_VAR *status_var) noexcept
Register status variable.
Definition: component_status_var_service.cc:42
bool add_status_vars(const SHOW_VAR *)
Definition: sql_show.cc:3242
void remove_status_vars(SHOW_VAR *)
Definition: sql_show.cc:3419
Specifies macros to define Service Implementations.
#define DEFINE_BOOL_METHOD(name, args)
A short macro to define method that returns bool, which is the most common case.
Definition: service_implementation.h:87
SHOW STATUS Server status variable.
Definition: status_var.h:78