MySQL  8.0.21
Source Code Documentation
leave_group_on_failure.h
Go to the documentation of this file.
1 /* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
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 LEAVE_GROUP_ON_FAILURE_INCLUDED
24 #define LEAVE_GROUP_ON_FAILURE_INCLUDED
25 
26 #include <bitset>
27 
30 
31 /**
32  Structure that holds the actions taken by the plugin when the
33  member leaves the group after a failure.
34 */
36  /**
37  @enum enum_actions
38  @brief Actions taken by the plugin when the member leaves the
39  group after a failure.
40  */
41  enum enum_actions {
50  };
51  using mask = std::bitset<ACTION_MAX>;
52 
53  /**
54  Do the instructed actions after a failure.
55 
56  @param[in] actions
57  Actions performed.
58  @param[in] error_to_log
59  Error logged into error log.
60  @param[in] session_isolation
61  Session creation requirements: use current thread,
62  use thread but initialize it or create it in a
63  dedicated thread.
64  @param[in] caller_notification_context
65  If defined the member state change notification
66  will update this notification context and the
67  notification signal responsibility belongs to the
68  caller.
69  If not defined (nullptr) a notification will be
70  sent by this function.
71  @param[in] exit_state_action_abort_log_message
72  The log message used on abort_plugin_process() if
73  that function is called.
74  */
75  static void leave(const mask &actions, longlong error_to_log,
76  enum_plugin_con_isolation session_isolation,
77  Notification_context *caller_notification_context,
78  const char *exit_state_action_abort_log_message);
79 };
80 
81 #endif /* LEAVE_GROUP_ON_FAILURE_INCLUDED */
Definition: leave_group_on_failure.h:48
Definition: leave_group_on_failure.h:49
enum_actions
Actions taken by the plugin when the member leaves the group after a failure.
Definition: leave_group_on_failure.h:41
Structure that holds the actions taken by the plugin when the member leaves the group after a failure...
Definition: leave_group_on_failure.h:35
Definition: leave_group_on_failure.h:42
Definition: leave_group_on_failure.h:45
long long int longlong
Definition: my_inttypes.h:54
A convenience context class used to share information between the event handlers and the notifier...
Definition: notification.h:34
Definition: leave_group_on_failure.h:47
static void leave(const mask &actions, longlong error_to_log, enum_plugin_con_isolation session_isolation, Notification_context *caller_notification_context, const char *exit_state_action_abort_log_message)
Do the instructed actions after a failure.
Definition: leave_group_on_failure.cc:34
std::bitset< ACTION_MAX > mask
Definition: leave_group_on_failure.h:51
Definition: leave_group_on_failure.h:44
Definition: leave_group_on_failure.h:43
enum_plugin_con_isolation
What is the policy when creation a new server session for SQL execution.
Definition: sql_service_command.h:37
Definition: leave_group_on_failure.h:46