MySQL 9.0.0
Source Code Documentation
engine_combination_tracker.h
Go to the documentation of this file.
1// Copyright (c) 2024, 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(std::string engine_name, std::string database_name,
43 std::string table_name, std::string &prev_engine_name,
44 std::string &prev_database_name,
45 std::string &prev_table_name);
46
47 /// This method clear the registered engine in the variable m_known_engine
48 void clear_known_engine();
49
50 /// This method get the value of is_warning_already_emitted
51 /// @retval true if a warning was already emitted false otherwise
53
54 /// This method sets the value of is_warning_already_emitted
55 /// @param value true or false
56 void set_warning_already_emitted(bool value);
57
58 private:
59 /// The engine data already seen used to check for incompatibilities
60 std::tuple<std::string, std::string, std::string> m_known_engine;
61 /// If a warning was already emitted for this transactions
63};
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:60
bool check_engine(std::string engine_name, std::string database_name, 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:56
bool is_warning_already_emitted
If a warning was already emitted for this transactions.
Definition: engine_combination_tracker.h:62
bool get_warning_already_emitted()
This method get the value of is_warning_already_emitted.
Definition: engine_combination_tracker.cc:60
void set_warning_already_emitted(bool value)
This method sets the value of is_warning_already_emitted.
Definition: engine_combination_tracker.cc:64
const char * table_name
Definition: rules_table_service.cc:56