My Project
Public Attributes
Binlog_transmit_observer Struct Reference

#include <replication.h>

List of all members.

Public Attributes

uint32 len
int(* transmit_start )(Binlog_transmit_param *param, const char *log_file, my_off_t log_pos)
int(* transmit_stop )(Binlog_transmit_param *param)
int(* reserve_header )(Binlog_transmit_param *param, unsigned char *header, unsigned long size, unsigned long *len)
int(* before_send_event )(Binlog_transmit_param *param, unsigned char *packet, unsigned long len, const char *log_file, my_off_t log_pos)
int(* after_send_event )(Binlog_transmit_param *param, const char *event_buf, unsigned long len, const char *skipped_log_file, my_off_t skipped_log_pos)
int(* after_reset_master )(Binlog_transmit_param *param)

Detailed Description

Observe and extends the binlog dumping thread.


Member Data Documentation

This callback is called after resetting master status

This is called when executing the command RESET MASTER, and is used to reset status variables added by observers.

Parameters:
paramObserver common parameter
Return values:
0Sucess
1Failure
int(* Binlog_transmit_observer::after_send_event)(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:
0Sucess
1Failure
int(* Binlog_transmit_observer::before_send_event)(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:
0Sucess
1Failure
int(* Binlog_transmit_observer::reserve_header)(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:
0Sucess
1Failure
int(* Binlog_transmit_observer::transmit_start)(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:
0Sucess
1Failure

This callback is called when binlog dumping stops

Parameters:
paramObserver common parameter
Return values:
0Sucess
1Failure

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines