MySQL 9.0.0
Source Code Documentation
replication.h File Reference
#include "my_thread_local.h"
#include "mysql/gtid/tag_plain.h"
#include "mysql/psi/mysql_thread.h"
#include "rpl_context.h"
#include "sql/handler.h"

Go to the source code of this file.

Classes

struct  st_server_ssl_variables
 Struct to share server ssl variables. More...
 
struct  Trans_table_info
 This represents table metadata involved in a transaction. More...
 
struct  Trans_context_info
 This represents some of the context in which a transaction is running It summarizes all necessary requirements for Group Replication to work. More...
 
struct  Trans_gtid_info
 This represents the GTID context of the transaction. More...
 
struct  Trans_param
 Transaction observer parameter. More...
 
struct  Trans_observer
 Observes and extends transaction execution. More...
 
struct  Server_state_param
 
struct  Server_state_observer
 Observer server state. More...
 
struct  Binlog_storage_param
 Binlog storage observer parameters. More...
 
struct  Binlog_storage_observer
 Observe binlog logging storage. More...
 
struct  Binlog_transmit_param
 Replication binlog transmitter (binlog dump) observer parameter. More...
 
struct  Binlog_transmit_observer
 Observe and extends the binlog dumping thread. More...
 
struct  Binlog_relay_IO_param
 Replication binlog relay IO observer parameter. More...
 
struct  Binlog_relay_IO_observer
 Observes and extends the service of slave IO thread. More...
 

Macros

#define MYSQL_THD   THD *
 
#define TRANS_PARAM_ZERO(trans_param_obj)    memset(&trans_param_obj, 0, sizeof(Trans_param));
 Transaction observer parameter initialization. More...
 
#define THD_ENTER_COND(P1, P2, P3, P4, P5)    thd_enter_cond(P1, P2, P3, P4, P5, __func__, __FILE__, __LINE__)
 
#define THD_EXIT_COND(P1, P2)    thd_exit_cond(P1, P2, __func__, __FILE__, __LINE__)
 

Typedefs

typedef struct Trans_table_info Trans_table_info
 This represents table metadata involved in a transaction. More...
 
typedef struct Trans_context_info Trans_context_info
 This represents some of the context in which a transaction is running It summarizes all necessary requirements for Group Replication to work. More...
 
typedef struct Trans_gtid_info Trans_gtid_info
 This represents the GTID context of the transaction. More...
 
typedef struct Trans_param Trans_param
 Transaction observer parameter. More...
 
typedef int(* before_dml_t) (Trans_param *param, int &out_val)
 
typedef int(* before_commit_t) (Trans_param *param)
 This callback is called before transaction commit. More...
 
typedef int(* before_rollback_t) (Trans_param *param)
 This callback is called before transaction rollback. More...
 
typedef int(* after_commit_t) (Trans_param *param)
 This callback is called after transaction commit. More...
 
typedef int(* after_rollback_t) (Trans_param *param)
 This callback is called after transaction rollback. More...
 
typedef int(* begin_t) (Trans_param *param, int &out_val)
 This callback is called before a sql command is executed. More...
 
typedef struct Trans_observer Trans_observer
 Observes and extends transaction execution. More...
 
typedef struct Server_state_param Server_state_param
 
typedef int(* before_handle_connection_t) (Server_state_param *param)
 This is called just before the server is ready to accept the client connections to the Server/Node. More...
 
typedef int(* before_recovery_t) (Server_state_param *param)
 This callback is called before the start of the recovery. More...
 
typedef int(* after_engine_recovery_t) (Server_state_param *param)
 This callback is called after the end of the engine recovery. More...
 
typedef int(* after_recovery_t) (Server_state_param *param)
 This callback is called after the end of the recovery procedure. More...
 
typedef int(* before_server_shutdown_t) (Server_state_param *param)
 This callback is called before the start of the shutdown procedure. More...
 
typedef int(* after_server_shutdown_t) (Server_state_param *param)
 This callback is called after the end of the shutdown procedure. More...
 
typedef int(* after_dd_upgrade_t) (Server_state_param *param)
 This is called just after an upgrade from MySQL 5.7 populates the data dictionary for the first time. More...
 
typedef struct Server_state_observer Server_state_observer
 Observer server state. More...
 
typedef struct Binlog_storage_param Binlog_storage_param
 Binlog storage observer parameters. More...
 
typedef int(* after_flush_t) (Binlog_storage_param *param, const char *log_file, my_off_t log_pos)
 This callback is called after binlog has been flushed. More...
 
typedef int(* after_sync_t) (Binlog_storage_param *param, const char *log_file, my_off_t log_pos)
 
typedef struct Binlog_storage_observer Binlog_storage_observer
 Observe binlog logging storage. More...
 
typedef struct Binlog_transmit_param Binlog_transmit_param
 Replication binlog transmitter (binlog dump) observer parameter. More...
 
typedef int(* transmit_start_t) (Binlog_transmit_param *param, const char *log_file, my_off_t log_pos)
 This callback is called when binlog dumping starts. More...
 
typedef int(* transmit_stop_t) (Binlog_transmit_param *param)
 This callback is called when binlog dumping stops. More...
 
typedef int(* reserve_header_t) (Binlog_transmit_param *param, unsigned char *header, unsigned long size, unsigned long *len)
 This callback is called to reserve bytes in packet header for event transmission. More...
 
typedef int(* before_send_event_t) (Binlog_transmit_param *param, unsigned char *packet, unsigned long len, const char *log_file, my_off_t log_pos)
 This callback is called before sending an event packet to slave. More...
 
typedef int(* after_send_event_t) (Binlog_transmit_param *param, const char *event_buf, unsigned long len, const char *skipped_log_file, my_off_t skipped_log_pos)
 This callback is called after an event packet is sent to the slave or is skipped. More...
 
typedef int(* after_reset_master_t) (Binlog_transmit_param *param)
 This callback is called after resetting master status. More...
 
typedef struct Binlog_transmit_observer Binlog_transmit_observer
 Observe and extends the binlog dumping thread. More...
 
typedef struct Binlog_relay_IO_param Binlog_relay_IO_param
 Replication binlog relay IO observer parameter. More...
 
typedef int(* thread_start_t) (Binlog_relay_IO_param *param)
 This callback is called when slave IO thread starts. More...
 
typedef int(* thread_stop_t) (Binlog_relay_IO_param *param)
 This callback is called when slave IO thread stops. More...
 
typedef int(* applier_start_t) (Binlog_relay_IO_param *param)
 This callback is called when a relay log consumer thread starts. More...
 
typedef int(* applier_stop_t) (Binlog_relay_IO_param *param, bool aborted)
 This callback is called when a relay log consumer thread stops. More...
 
typedef int(* before_request_transmit_t) (Binlog_relay_IO_param *param, uint32 flags)
 This callback is called before slave requesting binlog transmission from master. More...
 
typedef int(* after_read_event_t) (Binlog_relay_IO_param *param, const char *packet, unsigned long len, const char **event_buf, unsigned long *event_len)
 This callback is called after read an event packet from master. More...
 
typedef int(* after_queue_event_t) (Binlog_relay_IO_param *param, const char *event_buf, unsigned long event_len, uint32 flags)
 This callback is called after written an event packet to relay log. More...
 
typedef int(* after_reset_slave_t) (Binlog_relay_IO_param *param)
 This callback is called after reset replica relay log IO status. More...
 
typedef int(* applier_log_event_t) (Binlog_relay_IO_param *param, Trans_param *trans_param, int &out)
 This callback is called before event gets applied. More...
 
typedef struct Binlog_relay_IO_observer Binlog_relay_IO_observer
 Observes and extends the service of slave IO thread. More...
 

Enumerations

enum  Trans_flags { TRANS_IS_REAL_TRANS = 1 }
 Transaction observer flags. More...
 
enum  Binlog_storage_flags { BINLOG_STORAGE_IS_SYNCED = 1 }
 Binlog storage flags. More...
 
enum  Binlog_relay_IO_flags { BINLOG_RELAY_IS_SYNCED = 1 }
 Binlog relay IO flags. More...
 

Functions

int register_trans_observer (Trans_observer *observer, void *p)
 Register a transaction observer. More...
 
int unregister_trans_observer (Trans_observer *observer, void *p)
 Unregister a transaction observer. More...
 
int register_binlog_storage_observer (Binlog_storage_observer *observer, void *p)
 Register a binlog storage observer. More...
 
int unregister_binlog_storage_observer (Binlog_storage_observer *observer, void *p)
 Unregister a binlog storage observer. More...
 
int register_binlog_transmit_observer (Binlog_transmit_observer *observer, void *p)
 Register a binlog transmit observer. More...
 
int unregister_binlog_transmit_observer (Binlog_transmit_observer *observer, void *p)
 Unregister a binlog transmit observer. More...
 
int register_server_state_observer (Server_state_observer *observer, void *p)
 Register a server state observer. More...
 
int unregister_server_state_observer (Server_state_observer *observer, void *p)
 Unregister a server state observer. More...
 
int register_binlog_relay_io_observer (Binlog_relay_IO_observer *observer, void *p)
 Register a binlog relay IO (slave IO thread) observer. More...
 
int unregister_binlog_relay_io_observer (Binlog_relay_IO_observer *observer, void *p)
 Unregister a binlog relay IO (slave IO thread) observer. More...
 
void thd_enter_cond (void *opaque_thd, mysql_cond_t *cond, mysql_mutex_t *mutex, const PSI_stage_info *stage, PSI_stage_info *old_stage, const char *src_function, const char *src_file, int src_line)
 Set thread entering a condition. More...
 
void thd_exit_cond (void *opaque_thd, const PSI_stage_info *stage, const char *src_function, const char *src_file, int src_line)
 Set thread leaving a condition. More...
 
int get_user_var_int (const char *name, long long int *value, int *null_value)
 Get the value of user variable as an integer. More...
 
int get_user_var_real (const char *name, double *value, int *null_value)
 Get the value of user variable as a double precision float number. More...
 
int get_user_var_str (const char *name, char *value, size_t len, unsigned int precision, int *null_value)
 Get the value of user variable as a string. More...
 

Macro Definition Documentation

◆ MYSQL_THD

#define MYSQL_THD   THD *

◆ THD_ENTER_COND

#define THD_ENTER_COND (   P1,
  P2,
  P3,
  P4,
  P5 
)     thd_enter_cond(P1, P2, P3, P4, P5, __func__, __FILE__, __LINE__)

◆ THD_EXIT_COND

#define THD_EXIT_COND (   P1,
  P2 
)     thd_exit_cond(P1, P2, __func__, __FILE__, __LINE__)

◆ TRANS_PARAM_ZERO

#define TRANS_PARAM_ZERO (   trans_param_obj)     memset(&trans_param_obj, 0, sizeof(Trans_param));

Transaction observer parameter initialization.

Typedef Documentation

◆ after_commit_t

typedef int(* after_commit_t) (Trans_param *param)

This callback is called after transaction commit.

This callback is called right after commit to storage engines for transactional tables.

For non-transactional tables, this is called at the end of the statement, before sending statement status, if the statement succeeded.

Note
The return value is currently ignored by the server.
Parameters
paramThe parameter for transaction observers
Return values
0Success
1Failure

◆ after_dd_upgrade_t

typedef int(* after_dd_upgrade_t) (Server_state_param *param)

This is called just after an upgrade from MySQL 5.7 populates the data dictionary for the first time.

Parameters
[in]paramObserver common parameter
Return values
0Success
>0Failure

◆ after_engine_recovery_t

typedef int(* after_engine_recovery_t) (Server_state_param *param)

This callback is called after the end of the engine recovery.

This is called before the start of the recovery procedure ie. the engine recovery.

Parameters
[in]paramObserver common parameter
Return values
0Success
>0Failure

◆ after_flush_t

typedef int(* after_flush_t) (Binlog_storage_param *param, const char *log_file, my_off_t log_pos)

This callback is called after binlog has been flushed.

This callback is called after cached events have been flushed to binary log file but not yet synced.

Parameters
paramObserver common parameter
log_fileBinlog file name been updated
log_posBinlog position after update
Return values
0Success
1Failure

◆ after_queue_event_t

typedef int(* after_queue_event_t) (Binlog_relay_IO_param *param, const char *event_buf, unsigned long event_len, uint32 flags)

This callback is called after written an event packet to relay log.

Parameters
paramObserver common parameter
event_bufEvent packet written to relay log
event_lenLength of the event packet written to relay log
flagsflags for relay log
Return values
0Success
1Failure

◆ after_read_event_t

typedef int(* after_read_event_t) (Binlog_relay_IO_param *param, const char *packet, unsigned long len, const char **event_buf, unsigned long *event_len)

This callback is called after read an event packet from master.

Parameters
paramObserver common parameter
packetThe event packet read from master
lenLength of the event packet read from master
event_bufThe event packet return after process
event_lenThe length of event packet return after process
Return values
0Success
1Failure

◆ after_recovery_t

typedef int(* after_recovery_t) (Server_state_param *param)

This callback is called after the end of the recovery procedure.

Parameters
[in]paramObserver common parameter
Return values
0Success
>0Failure

◆ after_reset_master_t

typedef int(* after_reset_master_t) (Binlog_transmit_param *param)

This callback is called after resetting master status.

This is called when executing the command RESET BINARY LOGS AND GTIDS, and is used to reset status variables added by observers.

Parameters
paramObserver common parameter
Return values
0Success
1Failure

◆ after_reset_slave_t

typedef int(* after_reset_slave_t) (Binlog_relay_IO_param *param)

This callback is called after reset replica relay log IO status.

Parameters
paramObserver common parameter
Return values
0Success
1Failure

◆ after_rollback_t

typedef int(* after_rollback_t) (Trans_param *param)

This callback is called after transaction rollback.

This callback is called right after rollback to storage engines for transactional tables.

For non-transactional tables, this is called at the end of the statement, before sending statement status, if the statement failed.

Note
The return value is currently ignored by the server.
Parameters
paramThe parameter for transaction observers
Return values
0Success
1Failure

◆ after_send_event_t

typedef int(* after_send_event_t) (Binlog_transmit_param *param, const char *event_buf, unsigned long len, const char *skipped_log_file, my_off_t skipped_log_pos)

This callback is called after an event packet is sent to the slave or is skipped.

Parameters
paramObserver common parameter
event_bufBinlog event packet buffer sent
lenlength of the event packet buffer
skipped_log_fileBinlog file name of the event that was skipped in the master. This is null if the position was not skipped
skipped_log_posBinlog position of the event that was skipped in the master. 0 if not skipped
Return values
0Success
1Failure

◆ after_server_shutdown_t

typedef int(* after_server_shutdown_t) (Server_state_param *param)

This callback is called after the end of the shutdown procedure.

Can be used as a checkpoint of the proper cleanup operations in some cases.

Parameters
[in]paramObserver common parameter
Return values
0Success
>0Failure

◆ after_sync_t

typedef int(* after_sync_t) (Binlog_storage_param *param, const char *log_file, my_off_t log_pos)

◆ applier_log_event_t

typedef int(* applier_log_event_t) (Binlog_relay_IO_param *param, Trans_param *trans_param, int &out)

This callback is called before event gets applied.

Parameters
paramObserver common parameter
trans_paramThe parameter for transaction observers
outReturn value from observer execution to help validate event according to observer requirement.
Return values
0Success
1Failure

◆ applier_start_t

typedef int(* applier_start_t) (Binlog_relay_IO_param *param)

This callback is called when a relay log consumer thread starts.

Parameters
paramObserver common parameter
Return values
0Success
1Failure

◆ applier_stop_t

typedef int(* applier_stop_t) (Binlog_relay_IO_param *param, bool aborted)

This callback is called when a relay log consumer thread stops.

Parameters
paramObserver common parameter
abortedthread aborted or exited on error
Return values
0Success
1Failure

◆ before_commit_t

typedef int(* before_commit_t) (Trans_param *param)

This callback is called before transaction commit.

This callback is called right before write binlog cache to binary log.

Parameters
paramThe parameter for transaction observers
Return values
0Success
1Failure

◆ before_dml_t

typedef int(* before_dml_t) (Trans_param *param, int &out_val)

◆ before_handle_connection_t

typedef int(* before_handle_connection_t) (Server_state_param *param)

This is called just before the server is ready to accept the client connections to the Server/Node.

It marks the possible point where the server can be said to be ready to serve client queries.

Parameters
[in]paramObserver common parameter
Return values
0Success
>0Failure

◆ before_recovery_t

typedef int(* before_recovery_t) (Server_state_param *param)

This callback is called before the start of the recovery.

Parameters
[in]paramObserver common parameter
Return values
0Success
>0Failure

◆ before_request_transmit_t

typedef int(* before_request_transmit_t) (Binlog_relay_IO_param *param, uint32 flags)

This callback is called before slave requesting binlog transmission from master.

This is called before slave issuing BINLOG_DUMP command to master to request binlog.

Parameters
paramObserver common parameter
flagsbinlog dump flags
Return values
0Success
1Failure

◆ before_rollback_t

typedef int(* before_rollback_t) (Trans_param *param)

This callback is called before transaction rollback.

This callback is called before rollback to storage engines.

Parameters
paramThe parameter for transaction observers
Return values
0Success
1Failure

◆ before_send_event_t

typedef int(* before_send_event_t) (Binlog_transmit_param *param, unsigned char *packet, unsigned long len, const char *log_file, my_off_t log_pos)

This callback is called before sending an event packet to slave.

Parameters
paramObserver common parameter
packetBinlog event packet to send
lenLength of the event packet
log_fileBinlog file name of the event packet to send
log_posBinlog position of the event packet to send
Return values
0Success
1Failure

◆ before_server_shutdown_t

typedef int(* before_server_shutdown_t) (Server_state_param *param)

This callback is called before the start of the shutdown procedure.

Can be useful to initiate some cleanup operations in some cases.

Parameters
[in]paramObserver common parameter
Return values
0Success
>0Failure

◆ begin_t

typedef int(* begin_t) (Trans_param *param, int &out_val)

This callback is called before a sql command is executed.

Parameters
paramThe parameter for transaction observers
out_valReturn value from observer execution
Return values
0Success
1Failure

◆ Binlog_relay_IO_observer

Observes and extends the service of slave IO thread.

◆ Binlog_relay_IO_param

Replication binlog relay IO observer parameter.

◆ Binlog_storage_observer

Observe binlog logging storage.

◆ Binlog_storage_param

Binlog storage observer parameters.

◆ Binlog_transmit_observer

Observe and extends the binlog dumping thread.

◆ Binlog_transmit_param

Replication binlog transmitter (binlog dump) observer parameter.

◆ reserve_header_t

typedef int(* reserve_header_t) (Binlog_transmit_param *param, unsigned char *header, unsigned long size, unsigned long *len)

This callback is called to reserve bytes in packet header for event transmission.

This callback is called when resetting transmit packet header to reserve bytes for this observer in packet header.

The header buffer is allocated by the server code, and size is the size of the header buffer. Each observer can only reserve a maximum size of size in the header.

Parameters
paramObserver common parameter
headerPointer of the header buffer
sizeSize of the header buffer
lenHeader length reserved by this observer
Return values
0Success
1Failure

◆ Server_state_observer

Observer server state.

◆ Server_state_param

◆ thread_start_t

typedef int(* thread_start_t) (Binlog_relay_IO_param *param)

This callback is called when slave IO thread starts.

Parameters
paramObserver common parameter
Return values
0Success
1Failure

◆ thread_stop_t

typedef int(* thread_stop_t) (Binlog_relay_IO_param *param)

This callback is called when slave IO thread stops.

Parameters
paramObserver common parameter
Return values
0Success
1Failure

◆ Trans_context_info

This represents some of the context in which a transaction is running It summarizes all necessary requirements for Group Replication to work.

These requirements might be extracted in two different moments in time, and, as such, with different contexts:

  • Startup verifications, that are extracted when Group Replication starts, and typically from global vars.
  • Runtime verifications, that are extracted when a transaction is running. It it typically from session THD vars or from mutable global vars.

Please refer to the place where information is extracted for more details about it.

◆ Trans_gtid_info

This represents the GTID context of the transaction.

◆ Trans_observer

Observes and extends transaction execution.

◆ Trans_param

typedef struct Trans_param Trans_param

Transaction observer parameter.

◆ Trans_table_info

This represents table metadata involved in a transaction.

◆ transmit_start_t

typedef int(* transmit_start_t) (Binlog_transmit_param *param, const char *log_file, my_off_t log_pos)

This callback is called when binlog dumping starts.

Parameters
paramObserver common parameter
log_fileBinlog file name to transmit from
log_posBinlog position to transmit from
Return values
0Success
1Failure

◆ transmit_stop_t

typedef int(* transmit_stop_t) (Binlog_transmit_param *param)

This callback is called when binlog dumping stops.

Parameters
paramObserver common parameter
Return values
0Success
1Failure

Enumeration Type Documentation

◆ Binlog_relay_IO_flags

Binlog relay IO flags.

Enumerator
BINLOG_RELAY_IS_SYNCED 

Binary relay log was sync:ed.

◆ Binlog_storage_flags

Binlog storage flags.

Enumerator
BINLOG_STORAGE_IS_SYNCED 

Binary log was sync:ed.

◆ Trans_flags

Transaction observer flags.

Enumerator
TRANS_IS_REAL_TRANS 

Transaction is a real transaction.

Function Documentation

◆ get_user_var_int()

int get_user_var_int ( const char *  name,
long long int *  value,
int *  null_value 
)

Get the value of user variable as an integer.

This function will return the value of variable name as an integer. If the original value of the variable is not an integer, the value will be converted into an integer.

Parameters
nameuser variable name
valuepointer to return the value
null_valueif not NULL, the function will set it to true if the value of variable is null, set to false if not
Return values
0Success
1Variable not found

◆ get_user_var_real()

int get_user_var_real ( const char *  name,
double *  value,
int *  null_value 
)

Get the value of user variable as a double precision float number.

This function will return the value of variable name as real number. If the original value of the variable is not a real number, the value will be converted into a real number.

Parameters
nameuser variable name
valuepointer to return the value
null_valueif not NULL, the function will set it to true if the value of variable is null, set to false if not
Return values
0Success
1Variable not found

◆ get_user_var_str()

int get_user_var_str ( const char *  name,
char *  value,
size_t  len,
unsigned int  precision,
int *  null_value 
)

Get the value of user variable as a string.

This function will return the value of variable name as string. If the original value of the variable is not a string, the value will be converted into a string.

Parameters
nameuser variable name
valuepointer to the value buffer
lenlength of the value buffer
precisionprecision of the value if it is a float number
null_valueif not NULL, the function will set it to true if the value of variable is null, set to false if not
Return values
0Success
1Variable not found

◆ register_binlog_relay_io_observer()

int register_binlog_relay_io_observer ( Binlog_relay_IO_observer observer,
void *  p 
)

Register a binlog relay IO (slave IO thread) observer.

Parameters
observerThe binlog relay IO observer to register
ppointer to the internal plugin structure
Return values
0Success
1Observer already exists

◆ register_binlog_storage_observer()

int register_binlog_storage_observer ( Binlog_storage_observer observer,
void *  p 
)

Register a binlog storage observer.

Parameters
observerThe binlog storage observer to register
ppointer to the internal plugin structure
Return values
0Success
1Observer already exists

◆ register_binlog_transmit_observer()

int register_binlog_transmit_observer ( Binlog_transmit_observer observer,
void *  p 
)

Register a binlog transmit observer.

Parameters
observerThe binlog transmit observer to register
ppointer to the internal plugin structure
Return values
0Success
1Observer already exists

◆ register_server_state_observer()

int register_server_state_observer ( Server_state_observer observer,
void *  p 
)

Register a server state observer.

Parameters
observerThe server state observer to register
ppointer to the internal plugin structure
Return values
0Success
1Observer already exists

◆ register_trans_observer()

int register_trans_observer ( Trans_observer observer,
void *  p 
)

Register a transaction observer.

Parameters
observerThe transaction observer to register
ppointer to the internal plugin structure
Return values
0Success
1Observer already exists

◆ thd_enter_cond()

void thd_enter_cond ( void *  opaque_thd,
mysql_cond_t cond,
mysql_mutex_t mutex,
const PSI_stage_info stage,
PSI_stage_info old_stage,
const char *  src_function,
const char *  src_file,
int  src_line 
)

Set thread entering a condition.

This function should be called before putting a thread to wait for a condition. mutex should be held before calling this function. After being waken up, thd_exit_cond should be called.

Parameters
opaque_thdThe thread entering the condition, NULL means current thread
condThe condition the thread is going to wait for
mutexThe mutex associated with the condition, this must be held before call this function
stageThe new process message for the thread
old_stageThe old process message for the thread
src_functionThe caller source function name
src_fileThe caller source file name
src_lineThe caller source line number

◆ thd_exit_cond()

void thd_exit_cond ( void *  opaque_thd,
const PSI_stage_info stage,
const char *  src_function,
const char *  src_file,
int  src_line 
)

Set thread leaving a condition.

This function should be called after a thread being waken up for a condition.

Parameters
opaque_thdThe thread entering the condition, NULL means current thread
stageThe process message, usually this should be the old process message before calling thd_enter_cond
src_functionThe caller source function name
src_fileThe caller source file name
src_lineThe caller source line number

◆ unregister_binlog_relay_io_observer()

int unregister_binlog_relay_io_observer ( Binlog_relay_IO_observer observer,
void *  p 
)

Unregister a binlog relay IO (slave IO thread) observer.

Parameters
observerThe binlog relay IO observer to unregister
ppointer to the internal plugin structure
Return values
0Success
1Observer not exists

◆ unregister_binlog_storage_observer()

int unregister_binlog_storage_observer ( Binlog_storage_observer observer,
void *  p 
)

Unregister a binlog storage observer.

Parameters
observerThe binlog storage observer to unregister
ppointer to the internal plugin structure
Return values
0Success
1Observer not exists

◆ unregister_binlog_transmit_observer()

int unregister_binlog_transmit_observer ( Binlog_transmit_observer observer,
void *  p 
)

Unregister a binlog transmit observer.

Parameters
observerThe binlog transmit observer to unregister
ppointer to the internal plugin structure
Return values
0Success
1Observer not exists

◆ unregister_server_state_observer()

int unregister_server_state_observer ( Server_state_observer observer,
void *  p 
)

Unregister a server state observer.

Parameters
observerThe server state observer to unregister
ppointer to the internal plugin structure
Return values
0Success
1Observer not exists

◆ unregister_trans_observer()

int unregister_trans_observer ( Trans_observer observer,
void *  p 
)

Unregister a transaction observer.

Parameters
observerThe transaction observer to unregister
ppointer to the internal plugin structure
Return values
0Success
1Observer not exists