MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
engine_combination_tracker.h
Go to the documentation of this file.
1// Copyright (c) 2024, 2025, Oracle and/or its affiliates.
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 designed to work 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 either included with
13// the program or referenced in the documentation.
14//
15// This program is distributed in the hope that it will be useful,
16// but WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License, version 2.0, for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with this program; if not, write to the Free Software
22// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
24#include <string>
25#include <tuple>
26
28 public:
29 /// This function determines whether the current engine is compatible
30 /// with previous engine or not.
31 ///
32 /// @param[in] engine_name current engine name
33 /// @param[in] database_name current database name
34 /// @param[in] table_name current table name
35 /// @param[out] prev_engine_name the incompatible engine name (for logging)
36 /// @param[out] prev_database_name the incompatible database (for logging)
37 /// @param[out] prev_table_name the incompatible table (for logging)
38 ///
39 /// @retval true if engine is not compatible
40 /// @retval false if engine is compatible
41
42 bool check_engine(const std::string &engine_name,
43 const std::string &database_name,
44 const std::string &table_name,
45 std::string &prev_engine_name,
46 std::string &prev_database_name,
47 std::string &prev_table_name);
48
49 /// This method clear the registered engine in the variable m_known_engine
50 void clear_known_engine();
51
52 /// This method get the value of is_warning_already_emitted
53 /// @retval true if a warning was already emitted false otherwise
55
56 /// This method sets the value of is_warning_already_emitted
57 /// @param value true or false
59
60 private:
61 /// The engine data already seen used to check for incompatibilities
62 std::tuple<std::string, std::string, std::string> m_known_engine;
63 /// If a warning was already emitted for this transactions
65};
Definition: engine_combination_tracker.h:27
std::tuple< std::string, std::string, std::string > m_known_engine
The engine data already seen used to check for incompatibilities.
Definition: engine_combination_tracker.h:62
bool check_engine(const std::string &engine_name, const std::string &database_name, const std::string &table_name, std::string &prev_engine_name, std::string &prev_database_name, std::string &prev_table_name)
This function determines whether the current engine is compatible with previous engine or not.
Definition: engine_combination_tracker.cc:27
void clear_known_engine()
This method clear the registered engine in the variable m_known_engine.
Definition: engine_combination_tracker.cc:57
bool is_warning_already_emitted
If a warning was already emitted for this transactions.
Definition: engine_combination_tracker.h:64
bool get_warning_already_emitted()
This method get the value of is_warning_already_emitted.
Definition: engine_combination_tracker.cc:61
void set_warning_already_emitted(bool value)
This method sets the value of is_warning_already_emitted.
Definition: engine_combination_tracker.cc:65
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83
const char * table_name
Definition: rules_table_service.cc:56