MySQL 26.7.0
Source Code Documentation
ha0sys_var_handler_interface.h
Go to the documentation of this file.
1/* Copyright (c) 2023, 2026, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify it under
4the terms of the GNU General Public License, version 2.0, as published by the
5Free 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, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
18for more details.
19
20You should have received a copy of the GNU General Public License along with
21this program; if not, write to the Free Software Foundation, Inc.,
2251 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23*/
24
25#pragma once
26
27#include <cstdint>
28#include <string_view>
29
30class THD; // Forward declaration
31namespace ib {
32/* This interface provides methods to handle the system variables related
33configurations. The goal is to enable multiple implementation by various
34sub systems within Innodb. A Subsystem may have different implementations
35to handle the system variables related to it.*/
37 public:
38 /** Default destructor */
39 virtual ~Sys_var_handler_interface() = default;
40
41 /** Update the system variable to the new value.
42
43 @param[in] thd THD object, may be used to print warning
44 @param[in] name The system variable name
45 @param[in] new_value The value to be updated
46 @return true System variable was updated successfully
47 @return false Otherwise*/
48 [[nodiscard]] virtual bool update_var(THD *thd [[maybe_unused]],
49 std::string_view name,
50 uint64_t new_value) = 0;
51
52 /** Update the system variable to the new value.
53
54 @param[in] thd THD object, may be used to print warning
55 @param[in] name The system variable name
56 @param[in] new_value The value to be updated
57 @return true System variable was updated successfully
58 @return false Otherwise*/
59 [[nodiscard]] virtual bool update_var(THD *thd [[maybe_unused]],
60 std::string_view name,
61 bool new_value) = 0;
62};
63} // namespace ib
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: ha0sys_var_handler_interface.h:36
virtual ~Sys_var_handler_interface()=default
Default destructor.
virtual bool update_var(THD *thd, std::string_view name, uint64_t new_value)=0
Update the system variable to the new value.
virtual bool update_var(THD *thd, std::string_view name, bool new_value)=0
Update the system variable to the new value.
Definition: fil0fil.cc:1392