MySQL  8.0.22
Source Code Documentation
replication_observers_example.cc File Reference

Typedefs

typedef enum enum_before_commit_test_cases before_commit_test_cases
 

Enumerations

enum  enum_before_commit_test_cases { NEGATIVE_CERTIFICATION, POSITIVE_CERTIFICATION_WITH_GTID, POSITIVE_CERTIFICATION_WITHOUT_GTID, INVALID_CERTIFICATION_OUTCOME }
 

Functions

int validate_plugin_server_requirements (Trans_param *param)
 
int test_channel_service_interface_initialization ()
 
int test_channel_service_interface ()
 
int test_channel_service_interface_io_thread ()
 
bool test_channel_service_interface_is_io_stopping ()
 
bool test_channel_service_interface_is_sql_stopping ()
 
bool test_channel_service_interface_relay_log_renamed ()
 
bool test_server_count_transactions ()
 
static void dump_server_state_calls ()
 
static int before_handle_connection (Server_state_param *)
 
static int before_recovery (Server_state_param *)
 
static int after_engine_recovery (Server_state_param *)
 
static int after_recovery (Server_state_param *)
 
static int before_server_shutdown (Server_state_param *)
 
static int after_server_shutdown (Server_state_param *)
 
static int after_dd_upgrade (Server_state_param *)
 
static void dump_transaction_calls ()
 
static int trans_before_dml (Trans_param *, int &out_val)
 
static int before_commit_tests (Trans_param *param, before_commit_test_cases test_case)
 
static int trans_before_commit (Trans_param *param)
 
static int trans_before_rollback (Trans_param *)
 
static int trans_after_commit (Trans_param *)
 
static int trans_after_rollback (Trans_param *param)
 
static int trans_begin (Trans_param *param, int &out_val)
 
static void dump_binlog_relay_calls ()
 
static int binlog_relay_thread_start (Binlog_relay_IO_param *)
 
static int binlog_relay_thread_stop (Binlog_relay_IO_param *)
 
int binlog_relay_applier_start (Binlog_relay_IO_param *)
 
static int binlog_relay_applier_stop (Binlog_relay_IO_param *, bool aborted)
 
static int binlog_relay_before_request_transmit (Binlog_relay_IO_param *, uint32)
 
static int binlog_relay_after_read_event (Binlog_relay_IO_param *, const char *, unsigned long, const char **, unsigned long *)
 
static int binlog_relay_after_queue_event (Binlog_relay_IO_param *, const char *, unsigned long, uint32)
 
static int binlog_relay_after_reset_slave (Binlog_relay_IO_param *)
 
static int binlog_relay_applier_log_event (Binlog_relay_IO_param *, Trans_param *, int &)
 
static int replication_observers_example_plugin_init (MYSQL_PLUGIN plugin_info)
 
static int replication_observers_example_plugin_deinit (void *p)
 
 mysql_declare_plugin (replication_observers_example)
 

Variables

static MYSQL_PLUGIN plugin_info_ptr
 
static const mysql_service_registry_treg_srv = nullptr
 
const mysql_service_log_builtins_tlog_bi = nullptr
 accessor built-ins More...
 
const mysql_service_log_builtins_string_tlog_bs = nullptr
 string built-ins More...
 
static int before_handle_connection_call = 0
 
static int before_recovery_call = 0
 
static int after_engine_recovery_call = 0
 
static int after_recovery_call = 0
 
static int before_server_shutdown_call = 0
 
static int after_server_shutdown_call = 0
 
static int after_dd_upgrade_call = 0
 
static bool thread_aborted = false
 
Server_state_observer server_state_observer
 
static int trans_before_dml_call = 0
 
static int trans_before_commit_call = 0
 
static int trans_before_rollback_call = 0
 
static int trans_after_commit_call = 0
 
static int trans_after_rollback_call = 0
 
static int trans_begin_call = 0
 
Trans_observer trans_observer
 
static int binlog_relay_thread_start_call = 0
 
static int binlog_relay_thread_stop_call = 0
 
static int binlog_relay_applier_start_call = 0
 
static int binlog_relay_applier_stop_call = 0
 
static int binlog_relay_before_request_transmit_call = 0
 
static int binlog_relay_after_read_event_call = 0
 
static int binlog_relay_after_queue_event_call = 0
 
static int binlog_relay_after_reset_slave_call = 0
 
Binlog_relay_IO_observer relay_io_observer
 
struct Mysql_replication replication_observers_example_plugin
 
 mysql_declare_plugin_end
 

Typedef Documentation

◆ before_commit_test_cases

Enumeration Type Documentation

◆ enum_before_commit_test_cases

Enumerator
NEGATIVE_CERTIFICATION 
POSITIVE_CERTIFICATION_WITH_GTID 
POSITIVE_CERTIFICATION_WITHOUT_GTID 
INVALID_CERTIFICATION_OUTCOME 

Function Documentation

◆ after_dd_upgrade()

static int after_dd_upgrade ( Server_state_param )
static

◆ after_engine_recovery()

static int after_engine_recovery ( Server_state_param )
static

◆ after_recovery()

static int after_recovery ( Server_state_param )
static

◆ after_server_shutdown()

static int after_server_shutdown ( Server_state_param )
static

◆ before_commit_tests()

static int before_commit_tests ( Trans_param param,
before_commit_test_cases  test_case 
)
static

◆ before_handle_connection()

static int before_handle_connection ( Server_state_param )
static

◆ before_recovery()

static int before_recovery ( Server_state_param )
static

◆ before_server_shutdown()

static int before_server_shutdown ( Server_state_param )
static

◆ binlog_relay_after_queue_event()

static int binlog_relay_after_queue_event ( Binlog_relay_IO_param ,
const char *  ,
unsigned  long,
uint32   
)
static

◆ binlog_relay_after_read_event()

static int binlog_relay_after_read_event ( Binlog_relay_IO_param ,
const char *  ,
unsigned  long,
const char **  ,
unsigned long *   
)
static

◆ binlog_relay_after_reset_slave()

static int binlog_relay_after_reset_slave ( Binlog_relay_IO_param )
static

◆ binlog_relay_applier_log_event()

static int binlog_relay_applier_log_event ( Binlog_relay_IO_param ,
Trans_param ,
int &   
)
static

◆ binlog_relay_applier_start()

int binlog_relay_applier_start ( Binlog_relay_IO_param )

◆ binlog_relay_applier_stop()

static int binlog_relay_applier_stop ( Binlog_relay_IO_param ,
bool  aborted 
)
static

◆ binlog_relay_before_request_transmit()

static int binlog_relay_before_request_transmit ( Binlog_relay_IO_param ,
uint32   
)
static

◆ binlog_relay_thread_start()

static int binlog_relay_thread_start ( Binlog_relay_IO_param )
static

◆ binlog_relay_thread_stop()

static int binlog_relay_thread_stop ( Binlog_relay_IO_param )
static

◆ dump_binlog_relay_calls()

static void dump_binlog_relay_calls ( )
static

◆ dump_server_state_calls()

static void dump_server_state_calls ( )
static

◆ dump_transaction_calls()

static void dump_transaction_calls ( )
static

◆ mysql_declare_plugin()

mysql_declare_plugin ( replication_observers_example  )

◆ replication_observers_example_plugin_deinit()

static int replication_observers_example_plugin_deinit ( void *  p)
static

◆ replication_observers_example_plugin_init()

static int replication_observers_example_plugin_init ( MYSQL_PLUGIN  plugin_info)
static

◆ test_channel_service_interface()

int test_channel_service_interface ( )

◆ test_channel_service_interface_initialization()

int test_channel_service_interface_initialization ( )

◆ test_channel_service_interface_io_thread()

int test_channel_service_interface_io_thread ( )

◆ test_channel_service_interface_is_io_stopping()

bool test_channel_service_interface_is_io_stopping ( )

◆ test_channel_service_interface_is_sql_stopping()

bool test_channel_service_interface_is_sql_stopping ( )

◆ test_channel_service_interface_relay_log_renamed()

bool test_channel_service_interface_relay_log_renamed ( )

◆ test_server_count_transactions()

bool test_server_count_transactions ( )

◆ trans_after_commit()

static int trans_after_commit ( Trans_param )
static

◆ trans_after_rollback()

static int trans_after_rollback ( Trans_param param)
static

◆ trans_before_commit()

static int trans_before_commit ( Trans_param param)
static

◆ trans_before_dml()

static int trans_before_dml ( Trans_param ,
int &  out_val 
)
static

◆ trans_before_rollback()

static int trans_before_rollback ( Trans_param )
static

◆ trans_begin()

static int trans_begin ( Trans_param param,
int &  out_val 
)
static

◆ validate_plugin_server_requirements()

int validate_plugin_server_requirements ( Trans_param param)

Variable Documentation

◆ after_dd_upgrade_call

int after_dd_upgrade_call = 0
static

◆ after_engine_recovery_call

int after_engine_recovery_call = 0
static

◆ after_recovery_call

int after_recovery_call = 0
static

◆ after_server_shutdown_call

int after_server_shutdown_call = 0
static

◆ before_handle_connection_call

int before_handle_connection_call = 0
static

◆ before_recovery_call

int before_recovery_call = 0
static

◆ before_server_shutdown_call

int before_server_shutdown_call = 0
static

◆ binlog_relay_after_queue_event_call

int binlog_relay_after_queue_event_call = 0
static

◆ binlog_relay_after_read_event_call

int binlog_relay_after_read_event_call = 0
static

◆ binlog_relay_after_reset_slave_call

int binlog_relay_after_reset_slave_call = 0
static

◆ binlog_relay_applier_start_call

int binlog_relay_applier_start_call = 0
static

◆ binlog_relay_applier_stop_call

int binlog_relay_applier_stop_call = 0
static

◆ binlog_relay_before_request_transmit_call

int binlog_relay_before_request_transmit_call = 0
static

◆ binlog_relay_thread_start_call

int binlog_relay_thread_start_call = 0
static

◆ binlog_relay_thread_stop_call

int binlog_relay_thread_stop_call = 0
static

◆ log_bi

accessor built-ins

accessor built-ins

◆ log_bs

string built-ins

◆ mysql_declare_plugin_end

mysql_declare_plugin_end

◆ plugin_info_ptr

MYSQL_PLUGIN plugin_info_ptr
static

◆ reg_srv

const mysql_service_registry_t* reg_srv = nullptr
static

◆ relay_io_observer

Binlog_relay_IO_observer relay_io_observer
Initial value:
= {
struct Binlog_relay_IO_observer Binlog_relay_IO_observer
Observes and extends the service of slave IO thread.
static int binlog_relay_after_queue_event(Binlog_relay_IO_param *, const char *, unsigned long, uint32)
Definition: replication_observers_example.cc:459
static int binlog_relay_applier_log_event(Binlog_relay_IO_param *, Trans_param *, int &)
Definition: replication_observers_example.cc:472
static int binlog_relay_applier_stop(Binlog_relay_IO_param *, bool aborted)
Definition: replication_observers_example.cc:438
static int binlog_relay_after_read_event(Binlog_relay_IO_param *, const char *, unsigned long, const char **, unsigned long *)
Definition: replication_observers_example.cc:451
static int binlog_relay_before_request_transmit(Binlog_relay_IO_param *, uint32)
Definition: replication_observers_example.cc:444
static int binlog_relay_after_reset_slave(Binlog_relay_IO_param *)
Definition: replication_observers_example.cc:466
int binlog_relay_applier_start(Binlog_relay_IO_param *)
Definition: replication_observers_example.cc:433
static int binlog_relay_thread_stop(Binlog_relay_IO_param *)
Definition: replication_observers_example.cc:427
static int binlog_relay_thread_start(Binlog_relay_IO_param *)
Definition: replication_observers_example.cc:421

◆ replication_observers_example_plugin

struct Mysql_replication replication_observers_example_plugin
Initial value:
= {
#define MYSQL_REPLICATION_INTERFACE_VERSION
Definition: plugin.h:747

◆ server_state_observer

Server_state_observer server_state_observer
Initial value:
= {
}
static int before_recovery(Server_state_param *)
Definition: replication_observers_example.cc:117
static int before_handle_connection(Server_state_param *)
Definition: replication_observers_example.cc:111
static int after_dd_upgrade(Server_state_param *)
Definition: replication_observers_example.cc:147
static int after_recovery(Server_state_param *)
Definition: replication_observers_example.cc:129
static int after_server_shutdown(Server_state_param *)
Definition: replication_observers_example.cc:141
static int after_engine_recovery(Server_state_param *)
Definition: replication_observers_example.cc:123
static int before_server_shutdown(Server_state_param *)
Definition: replication_observers_example.cc:135
struct Server_state_observer Server_state_observer
Observer server state.

◆ thread_aborted

bool thread_aborted = false
static

◆ trans_after_commit_call

int trans_after_commit_call = 0
static

◆ trans_after_rollback_call

int trans_after_rollback_call = 0
static

◆ trans_before_commit_call

int trans_before_commit_call = 0
static

◆ trans_before_dml_call

int trans_before_dml_call = 0
static

◆ trans_before_rollback_call

int trans_before_rollback_call = 0
static

◆ trans_begin_call

int trans_begin_call = 0
static

◆ trans_observer

Trans_observer trans_observer
Initial value:
= {
sizeof(Trans_observer),
}
static int trans_before_commit(Trans_param *param)
Definition: replication_observers_example.cc:296
static int trans_begin(Trans_param *param, int &out_val)
Definition: replication_observers_example.cc:345
static int trans_after_commit(Trans_param *)
Definition: replication_observers_example.cc:325
struct Trans_observer Trans_observer
Observes and extends transaction execution.
static int trans_before_dml(Trans_param *, int &out_val)
Definition: replication_observers_example.cc:203
static int trans_after_rollback(Trans_param *param)
Definition: replication_observers_example.cc:336
static int trans_before_rollback(Trans_param *)
Definition: replication_observers_example.cc:319