MySQL 8.0.30
Source Code Documentation
mysql_transaction_delegate_control_imp.h
Go to the documentation of this file.
1/* Copyright (c) 2022, 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 also distributed 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 included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef MYSQL_TRANSACTION_DELEGATE_CONTROL
24#define MYSQL_TRANSACTION_DELEGATE_CONTROL
25
28
29/**
30 @class mysql_new_transaction_control_imp
31 This class is the implementation of service mysql_new_transaction_control.
32
33 @sa service mysql_new_transaction_control
34*/
36 public:
37 /**
38 Method to stop new incoming transactions allowing some management queries
39 to run. New incoming transactions are rolled back.
40 */
41 static DEFINE_METHOD(void, stop, ());
42
43 /**
44 Method that allows the transactions which were earlier stopped by
45 stop method.
46 */
47 static DEFINE_METHOD(void, allow, ());
48};
49
50/**
51 @class mysql_before_commit_transaction_control_imp
52 This class is the implementation of service
53 mysql_before_commit_transaction_control.
54
55 @sa service mysql_before_commit_transaction_control
56*/
58 public:
59 /**
60 Method rollback any transaction that reaches the commit stage.
61 */
62 static DEFINE_METHOD(void, stop, ());
63
64 /**
65 Method re-allows the commit, earlier stopped in stop function.
66 */
67 static DEFINE_METHOD(void, allow, ());
68};
69
70/* clang-format off */
71/**
72 @class mysql_close_connection_of_binloggable_transaction_not_reached_commit_imp
73 This class is the implementation of service
74 mysql_close_connection_of_binloggable_transaction_not_reached_commit.
75
76 @sa service
77 mysql_close_connection_of_binloggable_transaction_not_reached_commit
78*/
79/* clang-format on */
81 public:
82 /**
83 Method that gracefully closes the client connection which are running a
84 binloggable transactions that did not reach the commit stage.
85 */
86 static DEFINE_METHOD(void, close, ());
87};
88
89#endif
This class is the implementation of service mysql_before_commit_transaction_control.
Definition: mysql_transaction_delegate_control_imp.h:57
static void stop() noexcept
Method rollback any transaction that reaches the commit stage.
Definition: transaction_delegate_control_imp.cc:91
static void allow() noexcept
Method re-allows the commit, earlier stopped in stop function.
Definition: transaction_delegate_control_imp.cc:102
This class is the implementation of service mysql_close_connection_of_binloggable_transaction_not_rea...
Definition: mysql_transaction_delegate_control_imp.h:80
static void close() noexcept
Method that gracefully closes the client connection which are running a binloggable transactions that...
Definition: transaction_delegate_control_imp.cc:81
This class is the implementation of service mysql_new_transaction_control.
Definition: mysql_transaction_delegate_control_imp.h:35
static void allow() noexcept
Method that allows the transactions which were earlier stopped by stop method.
Definition: transaction_delegate_control_imp.cc:34
static void stop() noexcept
Method to stop new incoming transactions allowing some management queries to run.
Definition: transaction_delegate_control_imp.cc:30
Specifies macros to define Components.
#define DEFINE_METHOD(retval, name, args)
A macro to ensure method implementation has required properties, that is it does not throw exceptions...
Definition: service_implementation.h:78