MySQL 5.6.14 Source Code Document
|
#include <log_event.h>
Public Member Functions | |
Format_description_log_event (uint8 binlog_ver, const char *server_ver=0) | |
Format_description_log_event (const char *buf, uint event_len, const Format_description_log_event *description_event) | |
Log_event_type | get_type_code () |
bool | header_is_valid () const |
bool | version_is_valid () const |
bool | is_valid () const |
int | get_data_size () |
void | calc_server_version_split () |
ulong | get_version_product () const |
bool | is_version_before_checksum () const |
Public Member Functions inherited from Start_log_event_v3 | |
void | print (FILE *file, PRINT_EVENT_INFO *print_event_info) |
Start_log_event_v3 (const char *buf, const Format_description_log_event *description_event) | |
Public Member Functions inherited from Log_event | |
Log_event (enum_event_cache_type cache_type_arg=EVENT_INVALID_CACHE, enum_event_logging_type logging_type_arg=EVENT_INVALID_LOGGING) | |
void | print_timestamp (IO_CACHE *file, time_t *ts) |
void | print_header (IO_CACHE *file, PRINT_EVENT_INFO *print_event_info, bool is_more) |
void | print_base64 (IO_CACHE *file, PRINT_EVENT_INFO *print_event_info, bool is_more) |
bool | wrapper_my_b_safe_write (IO_CACHE *file, const uchar *buf, ulong data_length) |
void | set_artificial_event () |
void | set_relay_log_event () |
bool | is_artificial_event () const |
bool | is_relay_log_event () const |
bool | is_ignorable_event () const |
bool | is_no_filter_event () const |
bool | is_using_trans_cache () const |
bool | is_using_stmt_cache () const |
bool | is_using_immediate_logging () const |
Log_event (const char *buf, const Format_description_log_event *description_event) | |
void | register_temp_buf (char *buf) |
void | free_temp_buf () |
const char * | get_type_str () |
Public Attributes | |
uint8 | common_header_len |
uint8 | number_of_event_types |
uint8 * | post_header_len |
uchar | server_version_split [3] |
const uint8 * | event_type_permutation |
Public Attributes inherited from Start_log_event_v3 | |
time_t | created |
uint16 | binlog_version |
char | server_version [ST_SERVER_VER_LEN] |
bool | dont_set_created |
Public Attributes inherited from Log_event | |
my_off_t | log_pos |
char * | temp_buf |
struct timeval | when |
ulong | exec_time |
ulong | data_written |
uint32 | server_id |
uint32 | unmasked_server_id |
uint16 | flags |
ulong | slave_exec_mode |
enum_event_cache_type | event_cache_type |
enum_event_logging_type | event_logging_type |
ha_checksum | crc |
ulong | mts_group_idx |
Relay_log_info * | worker |
ulonglong | future_event_relay_log_pos |
uint8 | checksum_alg |
Additional Inherited Members | |
Public Types inherited from Log_event | |
enum | enum_skip_reason { EVENT_SKIP_NOT, EVENT_SKIP_IGNORE, EVENT_SKIP_COUNT } |
typedef unsigned char | Byte |
Static Public Member Functions inherited from Log_event | |
static Log_event * | read_log_event (IO_CACHE *file, const Format_description_log_event *description_event, my_bool crc_check) |
static void * | operator new (size_t size) |
static void | operator delete (void *ptr, size_t) |
static void * | operator new (size_t, void *ptr) |
static void | operator delete (void *, void *) |
static Log_event * | read_log_event (const char *buf, uint event_len, const char **error, const Format_description_log_event *description_event, my_bool crc_check) |
static const char * | get_type_str (Log_event_type type) |
Protected Types inherited from Log_event | |
enum | enum_event_cache_type { EVENT_INVALID_CACHE = 0, EVENT_STMT_CACHE, EVENT_TRANSACTIONAL_CACHE, EVENT_NO_CACHE, EVENT_CACHE_COUNT } |
enum | enum_event_logging_type { EVENT_INVALID_LOGGING = 0, EVENT_NORMAL_LOGGING, EVENT_IMMEDIATE_LOGGING, EVENT_CACHE_LOGGING_COUNT } |
For binlog version 4. This event is saved by threads which read it, as they need it for future use (to decode the ordinary events).
Definition at line 2647 of file log_event.h.
Format_description_log_event::Format_description_log_event | ( | uint8 | binlog_ver, |
const char * | server_ver = 0 |
||
) |
Format_description_log_event 1st ctor.
Ctor. Can be used to create the event to write to the binary log (when the server starts or when FLUSH LOGS), or to create artificial events to parse binlogs from MySQL 3.23 or 4.x. When in a client, only the 2nd use is possible.
binlog_version | the binlog version for which we want to build an event. Can be 1 (=MySQL 3.23), 3 (=4.0.x x>=2 and 4.1) or 4 (MySQL 5.0). Note that the old 4.0 (binlog version 2) is not supported; it should not be used for replication with 5.0. |
server_ver | a string containing the server version. |
Definition at line 5254 of file log_event.cc.
Format_description_log_event::Format_description_log_event | ( | const char * | buf, |
uint | event_len, | ||
const Format_description_log_event * | description_event | ||
) |
The problem with this constructor is that the fixed header may have a length different from this version, but we don't know this length as we have not read the Format_description_log_event which says it, yet. This length is in the post-header of the event, but we don't know where the post-header starts.
So this type of event HAS to:
I (Guilhem) chose the 2nd solution. Rotate has the same constraint (because it is sent before Format_description_log_event).
Definition at line 5417 of file log_event.cc.
void Format_description_log_event::calc_server_version_split | ( | ) |
'server_version_split' is used for lookups to find if the server which created this event has some known bug.
Definition at line 5718 of file log_event.cc.
ulong Format_description_log_event::get_version_product | ( | ) | const |
Definition at line 5732 of file log_event.cc.
bool Format_description_log_event::is_version_before_checksum | ( | ) | const |
Definition at line 5741 of file log_event.cc.