My Project
|
#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 Attributes | |
uint8 | common_header_len |
uint8 | number_of_event_types |
uint8 * | post_header_len |
uchar | server_version_split [3] |
const uint8 * | event_type_permutation |
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).
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. |
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).
'server_version_split' is used for lookups to find if the server which created this event has some known bug.
ulong Format_description_log_event::get_version_product | ( | ) | const |
bool Format_description_log_event::is_version_before_checksum | ( | ) | const |