MySQL 9.1.0
Source Code Documentation
|
Binlog_event_data_istream fetches byte data from Basic_istream and divides them into event_data chunk according to the format. More...
#include <binlog_reader.h>
Public Member Functions | |
Binlog_event_data_istream (Binlog_read_error *error, Basic_istream *istream, unsigned int max_event_size) | |
Binlog_event_data_istream ()=delete | |
Binlog_event_data_istream (const Binlog_event_data_istream &)=delete | |
Binlog_event_data_istream & | operator= (const Binlog_event_data_istream &)=delete |
virtual | ~Binlog_event_data_istream ()=default |
template<class ALLOCATOR > | |
bool | read_event_data (unsigned char **data, unsigned int *length, ALLOCATOR *allocator, bool verify_checksum, mysql::binlog::event::enum_binlog_checksum_alg checksum_alg) |
Read an event data from the stream and verify its checksum if verify_checksum is true. More... | |
Protected Member Functions | |
virtual bool | read_event_header () |
Read the event header from the Basic_istream. More... | |
bool | check_event_header () |
Check if it is a valid event header. More... | |
template<Binlog_read_error::Error_type ERROR_TYPE> | |
bool | read_fixed_length (unsigned char *data, unsigned int length) |
Read fixed length of data from Basic_istream. More... | |
Protected Attributes | |
unsigned char | m_header [LOG_EVENT_MINIMAL_HEADER_LEN] |
Binlog_read_error * | m_error |
It is convenient for caller to share a Binlog_read_error object between streams. More... | |
Private Member Functions | |
bool | fill_event_data (unsigned char *event_data, bool verify_checksum, mysql::binlog::event::enum_binlog_checksum_alg checksum_alg) |
Fill the event data into the given buffer and verify checksum if 'verify_checksum' is true. More... | |
Private Attributes | |
Basic_istream * | m_istream = nullptr |
unsigned int | m_max_event_size |
unsigned int | m_event_length = 0 |
Binlog_event_data_istream fetches byte data from Basic_istream and divides them into event_data chunk according to the format.
Event_data is a serialized event object. It is a chunk of data in buffer.
Binlog_event_data_istream::Binlog_event_data_istream | ( | Binlog_read_error * | error, |
Basic_istream * | istream, | ||
unsigned int | max_event_size | ||
) |
|
delete |
|
delete |
|
virtualdefault |
|
protected |
Check if it is a valid event header.
false | Success |
true | Error |
|
private |
Fill the event data into the given buffer and verify checksum if 'verify_checksum' is true.
[in] | event_data | The buffer where the event data will be stored. |
[in] | verify_checksum | Verify the event data's checksum if it is true. |
[in] | checksum_alg | Checksum algorithm for verifying the event data. It is used only when verify_checksum is true. |
false | Success |
true | Error |
|
delete |
|
inline |
Read an event data from the stream and verify its checksum if verify_checksum is true.
[out] | data | The pointer of the event data |
[out] | length | The length of the event data |
[in] | allocator | It is used to allocate memory for the event data. |
[in] | verify_checksum | Verify the event data's checksum if it is true. |
[in] | checksum_alg | Checksum algorithm for verifying the event data. It is used only when verify_checksum is true. |
false | Success |
true | Error |
|
protectedvirtual |
Read the event header from the Basic_istream.
false | Success |
true | Error |
|
inlineprotected |
Read fixed length of data from Basic_istream.
It sets error to
[in] | data | The buffer where the data stored. |
[in] | length | Bytes of the data to be read. |
false | Success |
true | Error |
|
protected |
It is convenient for caller to share a Binlog_read_error object between streams.
So Binlog_read_error pointer is defined here. It should be initialized in constructor by caller.
|
private |
|
protected |
|
private |
|
private |