MySQL 8.4.2
Source Code Documentation
rpl_handler.h
Go to the documentation of this file.
1/* Copyright (c) 2008, 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#ifndef RPL_HANDLER_H
25#define RPL_HANDLER_H
26
27#include <sys/types.h>
28#include <atomic>
29#include <map>
30
31#include "my_alloc.h"
32#include "my_dbug.h"
33#include "my_inttypes.h"
34#include "my_psi_config.h"
35#include "my_sys.h" // free_root
39#include "sql/locks/shared_spin_lock.h" // Shared_spin_lock
40#include "sql/psi_memory_key.h"
41#include "sql/sql_list.h" // List
42#include "sql/sql_plugin.h" // my_plugin_(un)lock
43#include "sql/sql_plugin_ref.h" // plugin_ref
44
45class Master_info;
46class String;
47class THD;
53struct Trans_observer;
54class Table_ref;
55
56/**
57 Variable to keep the value set for the
58 `replication_optimize_for_static_plugin_config` global.
59
60 When this global variable value is set to `1`, we prevent all plugins that
61 register replication observers to be unloaded until the variable is set to
62 `0`, again. While the value of the variable is `1`, we are also exchanging the
63 `Delegate` class read-write lock by an atomic-based shared spin-lock.
64
65 This behaviour is useful for increasing the throughtput of the master when a
66 large number of slaves is connected, by preventing the acquisition of the
67 `LOCK_plugin` mutex and using a more read-friendly lock in the `Delegate`
68 class, when invoking the observer's hooks.
69
70 Note that a large number of slaves means a large number of dump threads, which
71 means a large number of threads calling the registered observers hooks.
72
73 If `UNINSTALL` is executed on a replication observer plugin while the variable
74 is set to `1`, the unload of the plugin will be deferred until the variable's
75 value is set to `0`.
76*/
78/**
79 Variable to keep the value set for the
80 `replication_sender_observe_commit_only` global.
81
82 When this global variable is set to `1`, only the replication observer's
83 commit hook will be called, every other registered hook invocation is skipped.
84*/
85extern std::atomic<bool> opt_replication_sender_observe_commit_only;
86
88 public:
89 void *observer;
92
93 Observer_info(void *ob, st_plugin_int *p);
94};
95
96/**
97 Base class for adding replication event observer infra-structure. It's
98 meant to be sub-classed by classes that will provide the support for the
99 specific event types. This class is meant just to provide basic support
100 for managing observers and managing resource access and lock acquisition.
101 */
102class Delegate {
103 public:
106
107 /**
108 Class constructor
109
110 @param key the PFS key for instrumenting the class lock
111 */
112 explicit Delegate(
115#endif
116 );
117 /**
118 Class destructor
119 */
120 virtual ~Delegate();
121
122 /**
123 Adds an observer to the observer list.
124
125 @param observer The observer object to be added to the list
126 @param plugin The plugin the observer is being loaded from
127
128 @return 0 upon success, 1 otherwise
129 */
130 int add_observer(void *observer, st_plugin_int *plugin);
131 /**
132 Removes an observer from the observer list.
133
134 @param observer The observer object to be added to the list
135
136 @return 0 upon success, 1 otherwise
137 */
138 int remove_observer(void *observer);
139 /**
140 Retrieves an iterator for the observer list.
141
142 @return the iterator for the observer list
143 */
145 /**
146 Returns whether or not there are registered observers.
147
148 @return whether or not there are registered observers
149 */
150 bool is_empty();
151 /**
152 Acquires this Delegate class instance lock in read/shared mode.
153
154 @return 0 upon success, 1 otherwise
155 */
156 int read_lock();
157 /**
158 Acquires this Delegate class instance lock in write/exclusive mode.
159
160 @return 0 upon success, 1 otherwise
161 */
162 int write_lock();
163 /**
164 Releases this Delegate class instance lock.
165
166 @return 0 upon success, 1 otherwise
167 */
168 int unlock();
169 /**
170 Returns whether or not this instance was initialized.
171
172 @return whether or not this instance was initialized
173 */
174 bool is_inited();
175 /**
176 Toggles the type of lock between a classical read-write lock and a
177 shared-exclusive spin-lock.
178 */
179 void update_lock_type();
180 /**
181 Increases the `info->plugin` usage reference counting if
182 `replication_optimize_for_static_plugin_config` is being enabled, in order
183 to prevent plugin removal.
184
185 Decreases the `info->plugin` usage reference counting if
186 `replication_optimize_for_static_plugin_config` is being disabled, in order
187 to allow plugin removal.
188 */
190 /**
191 Returns whether or not to use the classic read-write lock.
192
193 The read-write lock should be used if that type of lock is already
194 acquired by some thread or if the server is not optimized for static
195 plugin configuration.
196
197 @returns true if one should use the classic read-write lock, false otherwise
198 */
199 bool use_rw_lock_type();
200 /**
201 Returns whether or not to use the shared spin-lock.
202
203 The shared spin-lock should be used if that type of lock is already
204 acquired by some thread or if the server is optimized for static plugin
205 configuration.
206
207 @returns true if one should use the shared spin-lock, false otherwise
208 */
209 bool use_spin_lock_type();
210
211 private:
212 /** List of registered observers */
214 /**
215 A read/write lock to be used when not optimizing for static plugin config
216 */
218 /**
219 A shared-exclusive spin lock to be used when optimizing for static plugin
220 config.
221 */
223 /** Memory pool to be used to allocate the observers list */
225 /** Flag statign whether or not this instance was initialized */
226 bool inited;
227 /**
228 The type of lock configured to be used, either a classic read-write (-1)
229 lock or a shared-exclusive spin lock (1).
230 */
231 std::atomic<int> m_configured_lock_type;
232 /**
233 The count of locks acquired: -1 will be added for each classic
234 read-write lock acquisitions; +1 will be added for each
235 shared-exclusive spin lock acquisition.
236 */
237 std::atomic<int> m_acquired_locks;
238 /**
239 List of acquired plugin references, to be held while
240 `replication_optimize_for_static_plugin_config` option is enabled. If the
241 option is disabled, the references in this list will be released.
242 */
243 std::map<plugin_ref, size_t> m_acquired_references;
244
246 DELEGATE_OS_LOCK = -1, // Lock used by this class is an OS RW lock
247 DELEGATE_SPIN_LOCK = 1, // Lock used by this class is a spin lock
248 };
249
251 DELEGATE_LOCK_MODE_SHARED = 0, // Lock acquired in shared/read mode
252 DELEGATE_LOCK_MODE_EXCLUSIVE = 1, // Lock acquired in exclusive/write mode
253 };
254
255 /**
256 Increases the `info->plugin` reference counting and stores that reference
257 internally.
258 */
260 /**
261 Locks the active lock (OS read-write lock or shared spin-lock)
262 according to the mode passed on as a parameter.
263
264 @param mode The mode to lock in, either DELEGATE_LOCK_MODE_SHARED or
265 DELEGATE_LOCK_MODE_EXCLUSIVE.
266 */
268};
269
270#ifdef HAVE_PSI_RWLOCK_INTERFACE
272#endif
273
275
276class Trans_delegate : public Delegate {
277 std::atomic<bool> m_rollback_transaction_on_begin{false};
279
280 public:
282 : Delegate(
285#endif
286 ) {
287 }
288
290
291 int before_dml(THD *thd, int &result);
292 int before_commit(THD *thd, bool all, Binlog_cache_storage *trx_cache_log,
293 Binlog_cache_storage *stmt_cache_log,
294 ulonglong cache_log_max_size, bool is_atomic_ddl);
295 int before_rollback(THD *thd, bool all);
296 int after_commit(THD *thd, bool all);
297 int after_rollback(THD *thd, bool all);
298 int trans_begin(THD *thd, int &result);
299
300 /**
301 The method sets the flag that will fail the new incoming transactions and
302 allows some management queries to run. New incoming transactions are rolled
303 back.
304 */
306
307 /**
308 The method that removes the restrictions on the transactions which were
309 earlier failing due to flag set by the set_transactions_at_begin_must_fail
310 method.
311 */
313
314 /**
315 Method to rollback the transactions that passed the begin state but have yet
316 not reached the begin_commit stage. Transactions are not allowed to
317 broadcast instead failure is returned from before_commit function.
318 */
320
321 /**
322 Method that allows the transactions to commit again which were earlier
323 stopped by set_transactions_not_reached_before_commit_must_fail method.
324 */
326};
327
328#ifdef HAVE_PSI_RWLOCK_INTERFACE
330#endif
331
333 public:
335 : Delegate(
338#endif
339 ) {
340 }
341
344 int before_recovery(THD *thd);
345 int after_engine_recovery(THD *thd);
346 int after_recovery(THD *thd);
347 int before_server_shutdown(THD *thd);
348 int after_server_shutdown(THD *thd);
350};
351
352#ifdef HAVE_PSI_RWLOCK_INTERFACE
354#endif
355
357 public:
359 : Delegate(
362#endif
363 ) {
364 }
365
367 int after_flush(THD *thd, const char *log_file, my_off_t log_pos);
368 int after_sync(THD *thd, const char *log_file, my_off_t log_pos);
369};
370
371#ifdef HAVE_PSI_RWLOCK_INTERFACE
373#endif
374
376 public:
378 : Delegate(
381#endif
382 ) {
383 }
384
386 int transmit_start(THD *thd, ushort flags, const char *log_file,
387 my_off_t log_pos, bool *observe_transmission);
388 int transmit_stop(THD *thd, ushort flags);
389 int reserve_header(THD *thd, ushort flags, String *packet);
390 int before_send_event(THD *thd, ushort flags, String *packet,
391 const char *log_file, my_off_t log_pos);
392 int after_send_event(THD *thd, ushort flags, String *packet,
393 const char *skipped_log_file, my_off_t skipped_log_pos);
394 int after_reset_master(THD *thd, ushort flags);
395};
396
397#ifdef HAVE_PSI_RWLOCK_INTERFACE
399#endif
400
402 public:
404 : Delegate(
407#endif
408 ) {
409 }
410
412 int thread_start(THD *thd, Master_info *mi);
413 int thread_stop(THD *thd, Master_info *mi);
414 int applier_start(THD *thd, Master_info *mi);
415 int applier_stop(THD *thd, Master_info *mi, bool aborted);
416 int before_request_transmit(THD *thd, Master_info *mi, ushort flags);
417 int after_read_event(THD *thd, Master_info *mi, const char *packet, ulong len,
418 const char **event_buf, ulong *event_len);
419 int after_queue_event(THD *thd, Master_info *mi, const char *event_buf,
420 ulong event_len, bool synced);
421 int after_reset_slave(THD *thd, Master_info *mi);
422 int applier_log_event(THD *thd, int &out);
423
424 private:
426};
427
428int delegates_init();
429/**
430 Verify that the replication plugins are ready and OK to be unloaded.
431 */
432void delegates_shutdown();
433void delegates_destroy();
434/**
435 Invokes `write_lock()` for all the observer delegate objects.
436*/
438/**
439 Releases locks for all the observer delegate objects.
440*/
442/**
443 Toggles the type of lock between a classical read-write lock and a
444 shared-exclusive spin-lock.
445*/
447
453
454/*
455 if there is no observers in the delegate, we can return 0
456 immediately.
457*/
458#define RUN_HOOK(group, hook, args) \
459 (group##_delegate->is_empty() ? 0 : group##_delegate->hook args)
460
461#define NO_HOOK(group) (group##_delegate->is_empty())
462
464
465#endif /* RPL_HANDLER_H */
Byte container that provides a storage for serializing session binlog events.
Definition: binlog_ostream.h:174
Definition: rpl_handler.h:401
int applier_start(THD *thd, Master_info *mi)
Definition: rpl_handler.cc:1191
int after_reset_slave(THD *thd, Master_info *mi)
Definition: rpl_handler.cc:1258
int thread_start(THD *thd, Master_info *mi)
Definition: rpl_handler.cc:1169
int applier_log_event(THD *thd, int &out)
Definition: rpl_handler.cc:1271
int applier_stop(THD *thd, Master_info *mi, bool aborted)
Definition: rpl_handler.cc:1202
Binlog_relay_IO_observer Observer
Definition: rpl_handler.h:411
int before_request_transmit(THD *thd, Master_info *mi, ushort flags)
Definition: rpl_handler.cc:1214
void init_param(Binlog_relay_IO_param *param, Master_info *mi)
Definition: rpl_handler.cc:1156
int after_queue_event(THD *thd, Master_info *mi, const char *event_buf, ulong event_len, bool synced)
Definition: rpl_handler.cc:1241
Binlog_relay_IO_delegate()
Definition: rpl_handler.h:403
int after_read_event(THD *thd, Master_info *mi, const char *packet, ulong len, const char **event_buf, ulong *event_len)
Definition: rpl_handler.cc:1226
int thread_stop(THD *thd, Master_info *mi)
Definition: rpl_handler.cc:1180
Definition: rpl_handler.h:356
Binlog_storage_observer Observer
Definition: rpl_handler.h:366
int after_sync(THD *thd, const char *log_file, my_off_t log_pos)
Definition: rpl_handler.cc:1013
Binlog_storage_delegate()
Definition: rpl_handler.h:358
int after_flush(THD *thd, const char *log_file, my_off_t log_pos)
Definition: rpl_handler.cc:896
Definition: rpl_handler.h:375
int before_send_event(THD *thd, ushort flags, String *packet, const char *log_file, my_off_t log_pos)
Definition: rpl_handler.cc:1108
int transmit_stop(THD *thd, ushort flags)
Definition: rpl_handler.cc:1043
int transmit_start(THD *thd, ushort flags, const char *log_file, my_off_t log_pos, bool *observe_transmission)
Definition: rpl_handler.cc:1029
Binlog_transmit_observer Observer
Definition: rpl_handler.h:385
int after_reset_master(THD *thd, ushort flags)
Definition: rpl_handler.cc:1144
int after_send_event(THD *thd, ushort flags, String *packet, const char *skipped_log_file, my_off_t skipped_log_pos)
Definition: rpl_handler.cc:1126
int reserve_header(THD *thd, ushort flags, String *packet)
Definition: rpl_handler.cc:1055
Binlog_transmit_delegate()
Definition: rpl_handler.h:377
Base class for adding replication event observer infra-structure.
Definition: rpl_handler.h:102
bool is_inited()
Returns whether or not this instance was initialized.
Definition: rpl_handler.cc:188
Delegate(PSI_rwlock_key key)
Class constructor.
Definition: rpl_handler.cc:87
int unlock()
Releases this Delegate class instance lock.
Definition: rpl_handler.cc:166
void update_plugin_ref_count()
Increases the info->plugin usage reference counting if replication_optimize_for_static_plugin_config ...
Definition: rpl_handler.cc:199
int read_lock()
Acquires this Delegate class instance lock in read/shared mode.
Definition: rpl_handler.cc:154
int remove_observer(void *observer)
Removes an observer from the observer list.
Definition: rpl_handler.cc:129
int write_lock()
Acquires this Delegate class instance lock in write/exclusive mode.
Definition: rpl_handler.cc:160
lock::Shared_spin_lock m_spin_lock
A shared-exclusive spin lock to be used when optimizing for static plugin config.
Definition: rpl_handler.h:222
bool is_empty()
Returns whether or not there are registered observers.
Definition: rpl_handler.cc:149
MEM_ROOT memroot
Memory pool to be used to allocate the observers list.
Definition: rpl_handler.h:224
Observer_info_list observer_info_list
List of registered observers.
Definition: rpl_handler.h:213
enum_delegate_lock_type
Definition: rpl_handler.h:245
@ DELEGATE_OS_LOCK
Definition: rpl_handler.h:246
@ DELEGATE_SPIN_LOCK
Definition: rpl_handler.h:247
bool use_spin_lock_type()
Returns whether or not to use the shared spin-lock.
Definition: rpl_handler.cc:234
bool inited
Flag statign whether or not this instance was initialized.
Definition: rpl_handler.h:226
void lock_it(enum_delegate_lock_mode mode)
Locks the active lock (OS read-write lock or shared spin-lock) according to the mode passed on as a p...
Definition: rpl_handler.cc:251
List_iterator< Observer_info > Observer_info_iterator
Definition: rpl_handler.h:105
void update_lock_type()
Toggles the type of lock between a classical read-write lock and a shared-exclusive spin-lock.
Definition: rpl_handler.cc:190
std::atomic< int > m_acquired_locks
The count of locks acquired: -1 will be added for each classic read-write lock acquisitions; +1 will ...
Definition: rpl_handler.h:237
virtual ~Delegate()
Class destructor.
Definition: rpl_handler.cc:105
Observer_info_iterator observer_info_iter()
Retrieves an iterator for the observer list.
Definition: rpl_handler.cc:145
mysql_rwlock_t lock
A read/write lock to be used when not optimizing for static plugin config.
Definition: rpl_handler.h:217
std::atomic< int > m_configured_lock_type
The type of lock configured to be used, either a classic read-write (-1) lock or a shared-exclusive s...
Definition: rpl_handler.h:231
enum_delegate_lock_mode
Definition: rpl_handler.h:250
@ DELEGATE_LOCK_MODE_SHARED
Definition: rpl_handler.h:251
@ DELEGATE_LOCK_MODE_EXCLUSIVE
Definition: rpl_handler.h:252
int add_observer(void *observer, st_plugin_int *plugin)
Adds an observer to the observer list.
Definition: rpl_handler.cc:110
bool use_rw_lock_type()
Returns whether or not to use the classic read-write lock.
Definition: rpl_handler.cc:222
List< Observer_info > Observer_info_list
Definition: rpl_handler.h:104
std::map< plugin_ref, size_t > m_acquired_references
List of acquired plugin references, to be held while replication_optimize_for_static_plugin_config op...
Definition: rpl_handler.h:243
void acquire_plugin_ref_count(Observer_info *info)
Increases the info->plugin reference counting and stores that reference internally.
Definition: rpl_handler.cc:246
Definition: sql_list.h:606
Definition: rpl_mi.h:87
Definition: rpl_handler.h:87
void * observer
Definition: rpl_handler.h:89
Observer_info(void *ob, st_plugin_int *p)
Definition: rpl_handler.cc:82
plugin_ref plugin
Definition: rpl_handler.h:91
st_plugin_int * plugin_int
Definition: rpl_handler.h:90
Definition: rpl_handler.h:332
Server_state_observer Observer
Definition: rpl_handler.h:342
int after_server_shutdown(THD *thd)
This hook MUST be invoked after server shutdown operation is complete.
Definition: rpl_handler.cc:990
int before_handle_connection(THD *thd)
This hook MUST be invoked after ALL recovery operations are performed and the server is ready to serv...
Definition: rpl_handler.cc:915
int before_server_shutdown(THD *thd)
This hook MUST be invoked before server shutdown action is initiated.
Definition: rpl_handler.cc:975
Server_state_delegate()
Definition: rpl_handler.h:334
int after_engine_recovery(THD *thd)
This hook MUST be invoked after the recovery from the engine is complete.
Definition: rpl_handler.cc:944
int after_recovery(THD *thd)
This hook MUST be invoked after the server has completed the local recovery.
Definition: rpl_handler.cc:960
int before_recovery(THD *thd)
This hook MUST be invoked before ANY recovery action is started.
Definition: rpl_handler.cc:929
int after_dd_upgrade_from_57(THD *thd)
This hook MUST be invoked after upgrade from .frm to data dictionary.
Definition: rpl_handler.cc:1004
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:167
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: table.h:2864
Definition: rpl_handler.h:276
Trans_delegate()
Definition: rpl_handler.h:281
int after_rollback(THD *thd, bool all)
Definition: rpl_handler.cc:828
int set_no_restrictions_at_transactions_before_commit()
Method that allows the transactions to commit again which were earlier stopped by set_transactions_no...
Definition: rpl_handler.cc:890
int before_dml(THD *thd, int &result)
Definition: rpl_handler.cc:741
std::atomic< bool > m_rollback_transaction_not_reached_before_commit
Definition: rpl_handler.h:278
int set_transactions_at_begin_must_fail()
The method sets the flag that will fail the new incoming transactions and allows some management quer...
Definition: rpl_handler.cc:872
int trans_begin(THD *thd, int &result)
Definition: rpl_handler.cc:847
int after_commit(THD *thd, bool all)
Definition: rpl_handler.cc:794
int before_rollback(THD *thd, bool all)
Definition: rpl_handler.cc:767
int set_no_restrictions_at_transaction_begin()
The method that removes the restrictions on the transactions which were earlier failing due to flag s...
Definition: rpl_handler.cc:878
Trans_observer Observer
Definition: rpl_handler.h:289
std::atomic< bool > m_rollback_transaction_on_begin
Definition: rpl_handler.h:277
int set_transactions_not_reached_before_commit_must_fail()
Method to rollback the transactions that passed the begin state but have yet not reached the begin_co...
Definition: rpl_handler.cc:884
int before_commit(THD *thd, bool all, Binlog_cache_storage *trx_cache_log, Binlog_cache_storage *stmt_cache_log, ulonglong cache_log_max_size, bool is_atomic_ddl)
Definition: rpl_handler.cc:545
Definition: shared_spin_lock.h:80
const char * p
Definition: ctype-mb.cc:1235
bool is_atomic_ddl(THD *thd, bool using_trans_arg)
The function lists all DDL instances that are supported for crash-recovery (WL9175).
Definition: log_event.cc:3703
unsigned int PSI_rwlock_key
Instrumented rwlock key.
Definition: psi_rwlock_bits.h:44
static int flags[50]
Definition: hp_test1.cc:40
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
ulonglong my_off_t
Definition: my_inttypes.h:72
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
#define HAVE_PSI_RWLOCK_INTERFACE
Definition: my_psi_config.h:85
Common header for many mysys elements.
Instrumentation helpers for rwlock.
Logfile log_file
Definition: mysqltest.cc:271
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
mode
Definition: file_handle.h:61
Instrumentation helpers for rwlock.
PSI_memory_key key_memory_delegate
Definition: psi_memory_key.cc:109
Performance schema instrumentation interface.
required string key
Definition: replication_asynchronous_connection_failover.proto:60
void delegates_release_locks()
Releases locks for all the observer delegate objects.
Definition: rpl_handler.cc:432
PSI_rwlock_key key_rwlock_Trans_delegate_lock
Definition: mysqld.cc:13468
Binlog_storage_delegate * binlog_storage_delegate
Definition: rpl_handler.cc:73
Trans_delegate * transaction_delegate
Definition: rpl_handler.cc:72
Binlog_transmit_delegate * binlog_transmit_delegate
Definition: rpl_handler.cc:76
int delegates_init()
Definition: rpl_handler.cc:354
PSI_rwlock_key key_rwlock_Binlog_storage_delegate_lock
Definition: mysqld.cc:13470
PSI_rwlock_key key_rwlock_Binlog_relay_IO_delegate_lock
Definition: mysqld.cc:13472
PSI_rwlock_key key_rwlock_Server_state_delegate_lock
Definition: mysqld.cc:13469
Binlog_relay_IO_delegate * binlog_relay_io_delegate
Definition: rpl_handler.cc:77
Server_state_delegate * server_state_delegate
Definition: rpl_handler.cc:74
void delegates_update_lock_type()
Toggles the type of lock between a classical read-write lock and a shared-exclusive spin-lock.
Definition: rpl_handler.cc:440
std::atomic< bool > opt_replication_sender_observe_commit_only
Variable to keep the value set for the replication_sender_observe_commit_only global.
Definition: rpl_handler.cc:80
int launch_hook_trans_begin(THD *thd, Table_ref *table)
Definition: rpl_handler.cc:1379
bool opt_replication_optimize_for_static_plugin_config
Variable to keep the value set for the replication_optimize_for_static_plugin_config global.
Definition: rpl_handler.cc:79
void delegates_shutdown()
Verify that the replication plugins are ready and OK to be unloaded.
Definition: rpl_handler.cc:393
void delegates_destroy()
Definition: rpl_handler.cc:402
void delegates_acquire_locks()
Invokes write_lock() for all the observer delegate objects.
Definition: rpl_handler.cc:424
PSI_rwlock_key key_rwlock_Binlog_transmit_delegate_lock
Definition: mysqld.cc:13471
Observes and extends the service of slave IO thread.
Definition: replication.h:738
Replication binlog relay IO observer parameter.
Definition: replication.h:602
Observe binlog logging storage.
Definition: replication.h:450
Observe and extends the binlog dumping thread.
Definition: replication.h:580
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Observer server state.
Definition: replication.h:409
Observes and extends transaction execution.
Definition: replication.h:305
An instrumented rwlock structure.
Definition: mysql_rwlock_bits.h:51
Definition: result.h:30
Definition: sql_plugin_ref.h:45