MySQL 8.0.40
Source Code Documentation
component_status_var_service.h
Go to the documentation of this file.
1/* Copyright (c) 2017, 2024, 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 designed to work 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 either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License, version 2.0, for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef COMPONENT_STATUS_VAR_SERVICE_H
25#define COMPONENT_STATUS_VAR_SERVICE_H
26
28#include <mysql/status_var.h>
29
30/**
31 Component status variables as a service to mysql_server component
32*/
33
34struct SHOW_VAR;
35
36/**
37 Service to register variable and unregister variable.
38*/
39BEGIN_SERVICE_DEFINITION(status_variable_registration)
40
41/**
42 Register status variable.
43
44 @param status_var fully constructed status variable object.
45 @return Status of performed operation
46 @retval false success
47 @retval true failure
48
49 Note: Please see the components/test/test_status_var_service.cc file,
50 to know how to construct status variables for different variable types.
51*/
53
54/**
55 Unregister's status variable.
56 @param status_var SHOW_VAR object with only the name of the variable,
57 which has to be removed from the global list.
58 @return Status of performed operation
59 @retval false success
60 @retval true failure
61*/
63
64END_SERVICE_DEFINITION(status_variable_registration)
65
66#endif /* COMPONENT_STATUS_VAR_SERVICE_H */
static mysql_service_status_t register_variable(const char *, const char *, int, const char *, mysql_sys_var_check_func, mysql_sys_var_update_func, void *, void *) noexcept
Definition: component_sys_variable_all_empty.cc:37
static mysql_service_status_t unregister_variable(const char *, const char *) noexcept
Definition: component_sys_variable_all_empty.cc:48
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:91
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:86
#define DECLARE_BOOL_METHOD(name, args)
Declares a method that returns bool as a part of the Service definition.
Definition: service.h:112
SHOW STATUS Server status variable.
Definition: status_var.h:79