MySQL 26.7.0
Source Code Documentation
log0sys_var_handler.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 2023, 2026, Oracle and/or its affiliates.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License, version 2.0, as published by the
7Free Software Foundation.
8
9This program is designed to work with certain software (including
10but not limited to OpenSSL) that is licensed under separate terms,
11as designated in a particular file or component or in included license
12documentation. The authors of MySQL hereby grant you an additional
13permission to link the program and your derivative works with the
14separately licensed software that they have either included with
15the program or referenced in the documentation.
16
17This program is distributed in the hope that it will be useful, but WITHOUT
18ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
20for more details.
21
22You should have received a copy of the GNU General Public License along with
23this program; if not, write to the Free Software Foundation, Inc.,
2451 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
26*****************************************************************************/
27
28#pragma once
29
30#include <string_view>
31
33
34namespace ib::redo {
35class Handler;
36/** This class implements the handling of redo log related system variables */
38 public:
40 ~Sys_var_handler() override;
41
42 [[nodiscard]] bool update_var(THD *thd, std::string_view name,
43 uint64_t new_value) override;
44
45 [[nodiscard]] bool update_var(THD *thd, std::string_view name,
46 bool new_value) override;
47
48 private:
49 /** Update the innodb_log_buffer_size system variable */
50 [[nodiscard]] bool buffer_size_update(uint64_t value);
51
52 /** Update the innodb_log_writer_threads system variable */
54
55 /** Update the innodb_redo_log_capacity system variable */
56 [[nodiscard]] bool capacity_update(THD *thd, std::string_view var_name,
57 uint64_t value);
58
59 [[nodiscard]] bool log_write_ahead_size_update(THD *thd,
60 std::string_view var_name,
61 uint64_t value);
63};
64} // namespace ib::redo
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4753
Definition: ha0sys_var_handler_interface.h:36
Definition: log0handler.h:41
This class implements the handling of redo log related system variables.
Definition: log0sys_var_handler.h:37
bool capacity_update(THD *thd, std::string_view var_name, uint64_t value)
Update the innodb_redo_log_capacity system variable.
Definition: log0sys_var_handler.cc:89
bool buffer_size_update(uint64_t value)
Update the innodb_log_buffer_size system variable.
Definition: log0sys_var_handler.cc:65
Sys_var_handler(Handler &handler)
Definition: log0sys_var_handler.h:39
bool update_var(THD *thd, std::string_view name, uint64_t new_value) override
Update the system variable to the new value.
Definition: log0sys_var_handler.cc:43
Handler & m_handler
Definition: log0sys_var_handler.h:62
void writer_threads_update(bool value)
Update the innodb_log_writer_threads system variable.
Definition: log0sys_var_handler.cc:82
bool log_write_ahead_size_update(THD *thd, std::string_view var_name, uint64_t value)
Definition: log0sys_var_handler.cc:129
~Sys_var_handler() override
Definition: log0sys_var_handler.cc:41
Definition: log0common.h:32
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83