MySQL 8.4.2
Source Code Documentation
|
This class holds the context of the iterator. More...
Classes | |
class | Passthrough_allocator |
This is a passthrough allocator. More... | |
Public Member Functions | |
Binlog_iterator_ctx (const Binlog_iterator_ctx &rhs)=delete | |
Binlog_iterator_ctx & | operator= (const Binlog_iterator_ctx &rhs)=delete |
Binlog_iterator_ctx (bool verify_checksum, const Gtid_set &excluded_gtids) | |
~Binlog_iterator_ctx () | |
bool | is_valid () const |
Checks whether the given context is valid or not. More... | |
std::string | get_current_file_open () const |
Get the current file open object. More... | |
void | set_current_file_open (const std::string &filename) |
Set the current file open object. More... | |
File_reader & | get_reader () |
Get the reader object. More... | |
void | set_buffer (unsigned char *buffer) |
Set the buffer object. More... | |
unsigned char * | get_buffer () |
Get the buffer object. More... | |
uint64_t | get_buffer_capacity () const |
Get the buffer capacity object. More... | |
void | set_buffer_capacity (uint64_t buffer_size) |
Set the buffer capacity object. More... | |
void | set_fde (const Format_description_event &new_fde) |
Set the fde object. More... | |
const Format_description_event & | get_fde () const |
Get the fde object. More... | |
std::tuple< bool, bool, uint64_t > | shall_skip_transaction (const unsigned char *buffer) |
This function checks whether the GTID event in the buffer is to be skipped or not. More... | |
bool | pin_log_files (const std::string &file) |
Locks the log files in the index that are as recent as the file provided, including the file provided. More... | |
Binlog_iterator_service_get_status | open_next_file () |
This member function opens the next file. More... | |
std::tuple< Binlog_iterator_service_get_status, uint64_t > | update_cursor () |
This member function checks if we need to move the cursor or switch to the next file. More... | |
Private Types | |
typedef Basic_binlog_file_reader< Binlog_ifile, Binlog_event_data_istream, Binlog_event_object_istream, Passthrough_allocator > | File_reader |
Private Member Functions | |
std::pair< bool, std::string > | get_next_file_to_open () const |
Get the next file to open object. More... | |
Private Attributes | |
std::string | m_current_file_open {} |
This is the current file opened. More... | |
File_reader * | m_reader {nullptr} |
This is a reference to the reader of the current file. More... | |
Format_description_event | m_current_fde {BINLOG_VERSION, server_version} |
This is a reference to the current format description event. More... | |
Tsid_map | m_local_tsid_map {nullptr} |
The local tsid map. More... | |
Gtid_set | m_excluded_gtid_set {&m_local_tsid_map} |
This is the set of gtids that are to be excluded while using this iterator. More... | |
unsigned char * | m_buffer {nullptr} |
This is a reference to the buffer used to store events read. More... | |
uint64_t | m_buffer_size {0} |
This a the capacity of the buffer used to store events read. More... | |
bool | m_is_valid {false} |
specifies if this context was properly constructed and therefore is valid. More... | |
LOG_INFO | m_linfo {} |
The log file information to lock files from being purged, i.e., the log one is reading from. More... | |
This class holds the context of the iterator.
The context of the iterator contains runtime data, such as the current file being read from, the reader instantiated, the pointer to the buffer used to store the event read, the set of transactions to be excluded, as well as the current format description event.
Note that we need to store the current format description event to be able to decode the a few events, such as the GTID and the Rotate event.
|
private |
|
delete |
|
inline |
|
inline |
|
inline |
Get the buffer object.
|
inline |
Get the buffer capacity object.
|
inline |
Get the current file open object.
|
inline |
Get the fde object.
|
inlineprivate |
Get the next file to open object.
|
inline |
Get the reader object.
|
inline |
Checks whether the given context is valid or not.
|
inline |
This member function opens the next file.
|
delete |
|
inline |
Locks the log files in the index that are as recent as the file provided, including the file provided.
file | the file to pin. All other subsequent and more recent are also pinned. |
|
inline |
Set the buffer object.
buffer | A pointer to the buffer. |
|
inline |
Set the buffer capacity object.
buffer_size | The buffer capacity. |
|
inline |
Set the current file open object.
filename | the name of the current file opened. |
|
inline |
Set the fde object.
new_fde | The new format description event to be copied. |
|
inline |
This function checks whether the GTID event in the buffer is to be skipped or not.
buffer | Contains the GTID event serialized. |
|
inline |
This member function checks if we need to move the cursor or switch to the next file.
|
private |
This is a reference to the buffer used to store events read.
|
private |
This a the capacity of the buffer used to store events read.
|
private |
This is a reference to the current format description event.
|
private |
This is the current file opened.
|
private |
This is the set of gtids that are to be excluded while using this iterator.
|
private |
specifies if this context was properly constructed and therefore is valid.
|
private |
The log file information to lock files from being purged, i.e., the log one is reading from.
|
private |
This is a reference to the reader of the current file.