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