MySQL 9.0.0
Source Code Documentation
|
Files | |
file | payload_event_buffer_istream.h |
Stream class that yields decompressed event byte buffers from a Transaction_payload_log_event. | |
Namespaces | |
namespace | mysql |
namespace | mysql::binlog |
namespace | mysql::binlog::event |
The namespace contains classes representing events that can occur in a replication stream. | |
namespace | mysql::binlog::event::compression |
namespace | mysql::binlog::event::compression::buffer |
namespace | mysql::binlog::event::math |
namespace | mysql::binlog::event::resource |
namespace | mysql::binlog::event::string |
namespace | binary_log |
Macros | |
#define | SYSTEM_CHARSET_MBMAXLEN 3 |
#define | NAME_CHAR_LEN 64 /* Field/table name length */ |
#define | NAME_LEN (NAME_CHAR_LEN * SYSTEM_CHARSET_MBMAXLEN) |
#define | ST_SERVER_VER_SPLIT_LEN 3 |
#define | BIN_LOG_HEADER_SIZE 4U |
#define | BINLOG_VERSION 4 |
binlog_version 3 is MySQL 4.x; 4 is MySQL 5.0.0. More... | |
#define | MAX_DBS_IN_EVENT_MTS 16 |
The maximum number of updated databases that a status of Query-log-event can carry. More... | |
#define | OVER_MAX_DBS_IN_EVENT_MTS 254 |
When the actual number of databases exceeds MAX_DBS_IN_EVENT_MTS the value of OVER_MAX_DBS_IN_EVENT_MTS is is put into the mts_accessed_dbs status. More... | |
#define | MAX_TIME_ZONE_NAME_LENGTH (NAME_LEN + 1) |
Maximum length of time zone name that we support (Time zone name is char(64) in db). More... | |
#define | MAX_SIZE_LOG_EVENT_STATUS |
Max number of possible extra bytes in a replication event compared to a packet (i.e. More... | |
#define | MAX_COMMIT_TIMESTAMP_VALUE (1ULL << 55) |
We use 7 bytes, 1 bit being used as a flag. More... | |
#define | LOG_EVENT_IGNORABLE_F 0x80 |
Setting this flag will mark an event as Ignorable. More... | |
#define | DUMPFILE_FLAG 0x1 |
#define | OPT_ENCLOSED_FLAG 0x2 |
#define | REPLACE_FLAG 0x4 |
#define | IGNORE_FLAG 0x8 |
#define | FIELD_TERM_EMPTY 0x1 |
#define | ENCLOSED_EMPTY 0x2 |
#define | LINE_TERM_EMPTY 0x4 |
#define | LINE_START_EMPTY 0x8 |
#define | ESCAPED_EMPTY 0x10 |
#define | EXTRA_ROW_INFO_LEN_OFFSET 0 |
1 byte length, 1 byte format Length is total length in bytes, including 2 byte header Length values 0 and 1 are currently invalid and reserved. More... | |
#define | EXTRA_ROW_INFO_FORMAT_OFFSET 1 |
#define | EXTRA_ROW_INFO_HEADER_LENGTH 2 |
#define | EXTRA_ROW_INFO_MAX_PAYLOAD (255 - EXTRA_ROW_INFO_HEADER_LENGTH) |
#define | ROWS_MAPID_OFFSET 0 |
#define | ROWS_FLAGS_OFFSET 6 |
#define | ROWS_VHLEN_OFFSET 8 |
#define | EXTRA_ROW_INFO_TYPECODE_LENGTH 1 |
#define | EXTRA_ROW_PART_INFO_VALUE_LENGTH 2 |
Enumerations | |
enum class | enum_extra_row_info_typecode { enum_extra_row_info_typecode::NDB = 0 , enum_extra_row_info_typecode::PART = 1 } |
This is the typecode defined for the different elements present in the container Extra_row_info, this is different from the format information stored inside extra_row_ndb_info at EXTRA_ROW_INFO_FORMAT_OFFSET. More... | |
Functions | |
void | do_server_version_split (const char *version, unsigned char split_versions[3]) |
In case the variable is updated, make sure to update it in $MYSQL_SOURCE_DIR/my_io.h. More... | |
uint32_t | do_server_version_int (const char *version) |
Transforms the server version from 'XX.YY.ZZ-suffix' into an integer in the format XXYYZZ. More... | |
unsigned long | version_product (const unsigned char *version_split) |
Calculate the version product from the numeric pieces representing the server version: For a server version X.Y.Zabc (X,Y,Z numbers, a not a digit), the input is {X,Y,Z}. More... | |
Variables | |
const int64_t | SEQ_UNINIT = 0 |
Uninitialized timestamp value (for either last committed or sequence number). More... | |
const int64_t | UNDEFINED_COMMIT_TIMESTAMP = MAX_COMMIT_TIMESTAMP_VALUE |
Used to determine whether the original_commit_timestamp is already known or if it still needs to be determined when computing it. More... | |
const uint32_t | UNDEFINED_SERVER_VERSION = 999999 |
const uint32_t | UNKNOWN_SERVER_VERSION = 0 |
const unsigned char | checksum_version_split [3] |
Replication event checksum is introduced in the following "checksum-home" version. More... | |
const unsigned long | checksum_version_product |
#define BIN_LOG_HEADER_SIZE 4U |
#define BINLOG_VERSION 4 |
binlog_version 3 is MySQL 4.x; 4 is MySQL 5.0.0.
Compared to version 3, version 4 has:
#define DUMPFILE_FLAG 0x1 |
#define ENCLOSED_EMPTY 0x2 |
#define ESCAPED_EMPTY 0x10 |
#define EXTRA_ROW_INFO_FORMAT_OFFSET 1 |
#define EXTRA_ROW_INFO_HEADER_LENGTH 2 |
#define EXTRA_ROW_INFO_LEN_OFFSET 0 |
1 byte length, 1 byte format Length is total length in bytes, including 2 byte header Length values 0 and 1 are currently invalid and reserved.
#define EXTRA_ROW_INFO_MAX_PAYLOAD (255 - EXTRA_ROW_INFO_HEADER_LENGTH) |
#define EXTRA_ROW_INFO_TYPECODE_LENGTH 1 |
#define EXTRA_ROW_PART_INFO_VALUE_LENGTH 2 |
#define FIELD_TERM_EMPTY 0x1 |
#define IGNORE_FLAG 0x8 |
#define LINE_START_EMPTY 0x8 |
#define LINE_TERM_EMPTY 0x4 |
#define LOG_EVENT_IGNORABLE_F 0x80 |
Setting this flag will mark an event as Ignorable.
#define MAX_COMMIT_TIMESTAMP_VALUE (1ULL << 55) |
We use 7 bytes, 1 bit being used as a flag.
#define MAX_DBS_IN_EVENT_MTS 16 |
The maximum number of updated databases that a status of Query-log-event can carry.
It can be redefined within a range [1.. OVER_MAX_DBS_IN_EVENT_MTS].
#define MAX_SIZE_LOG_EVENT_STATUS |
Max number of possible extra bytes in a replication event compared to a packet (i.e.
a query) sent from client to master; First, an auxiliary log_event status vars estimation:
#define MAX_TIME_ZONE_NAME_LENGTH (NAME_LEN + 1) |
Maximum length of time zone name that we support (Time zone name is char(64) in db).
mysqlbinlog needs it.
#define NAME_LEN (NAME_CHAR_LEN * SYSTEM_CHARSET_MBMAXLEN) |
#define OPT_ENCLOSED_FLAG 0x2 |
#define OVER_MAX_DBS_IN_EVENT_MTS 254 |
When the actual number of databases exceeds MAX_DBS_IN_EVENT_MTS the value of OVER_MAX_DBS_IN_EVENT_MTS is is put into the mts_accessed_dbs status.
#define REPLACE_FLAG 0x4 |
#define ROWS_FLAGS_OFFSET 6 |
#define ROWS_MAPID_OFFSET 0 |
#define ROWS_VHLEN_OFFSET 8 |
#define ST_SERVER_VER_SPLIT_LEN 3 |
#define SYSTEM_CHARSET_MBMAXLEN 3 |
|
strong |
|
inline |
Transforms the server version from 'XX.YY.ZZ-suffix' into an integer in the format XXYYZZ.
version | String representing server version |
|
inline |
In case the variable is updated, make sure to update it in $MYSQL_SOURCE_DIR/my_io.h.
Splits server 'version' string into three numeric pieces stored into 'split_versions': X.Y.Zabc (X,Y,Z numbers, a not a digit) -> {X,Y,Z} X.Yabc -> {X,Y,0}
version | String representing server version |
split_versions | Array with each element containing one split of the input version string |
|
inline |
Calculate the version product from the numeric pieces representing the server version: For a server version X.Y.Zabc (X,Y,Z numbers, a not a digit), the input is {X,Y,Z}.
This is converted to XYZ in bit representation.
version_split | Array containing the version information of the server |
|
extern |
|
extern |
Replication event checksum is introduced in the following "checksum-home" version.
The checksum-aware servers extract FD's version to decide whether the FD event carries checksum info.
const int64_t SEQ_UNINIT = 0 |
Uninitialized timestamp value (for either last committed or sequence number).
Often carries meaning of the minimum value in the logical timestamp domain.
const int64_t UNDEFINED_COMMIT_TIMESTAMP = MAX_COMMIT_TIMESTAMP_VALUE |
Used to determine whether the original_commit_timestamp is already known or if it still needs to be determined when computing it.
const uint32_t UNDEFINED_SERVER_VERSION = 999999 |
const uint32_t UNKNOWN_SERVER_VERSION = 0 |