MySQL 8.4.2
Source Code Documentation
s_mysql_binlog_storage_iterator Struct Reference

#include <binlog_storage_iterator.h>

Public Attributes

Binlog_iterator_service_init_status(* init )(my_h_binlog_storage_iterator *iterator, const char *excluded_gtids_as_string)
 Initializes the iterator. More...
 
Binlog_iterator_service_get_status(* get )(my_h_binlog_storage_iterator iterator, unsigned char *buffer, uint64_t buffer_capacity, uint64_t *bytes_read)
 Shall get the next event in the iterator. More...
 
void(* deinit )(my_h_binlog_storage_iterator iterator)
 Destroys the iterator and releases resources associated with it. More...
 
mysql_service_status_t(* get_storage_details )(my_h_binlog_storage_iterator iterator, char *buffer, uint64_t *size)
 Gets details about the entry's storage in a JSON format. More...
 
mysql_service_status_t(* get_next_entry_size )(my_h_binlog_storage_iterator iterator, uint64_t *size)
 Gets the size of the next entry to fetch from the iterator. More...
 

Member Data Documentation

◆ deinit

void(* s_mysql_binlog_storage_iterator::deinit) (my_h_binlog_storage_iterator iterator)

Destroys the iterator and releases resources associated with it.

Parameters
[in]iteratorthe iterator to destroy.

◆ get

Binlog_iterator_service_get_status(* s_mysql_binlog_storage_iterator::get) (my_h_binlog_storage_iterator iterator, unsigned char *buffer, uint64_t buffer_capacity, uint64_t *bytes_read)

Shall get the next event in the iterator.

Gets the next event in the iterator. If there are no more events in the iterator, it just returns immediately. Note that this function will also advance the iterator if the operation is successful or the next entries are to be skipped.

In case the error is kBinlogIteratorGetErrorInvalid or kBinlogIteratorGetErrorUnspecified the iterator must be de initialized by calling deinit. If the caller attempts to call get again, then the same error is returned.

Parameters
iteratorthe iterator reference to use use during the get operation.
[in,out]bufferthe buffer to store the raw change stream bytes for the next entry fetched from the given iterator.
[in]buffer_capacitythe capacity of the buffer where the bytes are to be stored.
[out]bytes_readthe amount of bytes read and put into the buffer.
Return values
kBinlogIteratorGetOkBinlog_iterator_service_get_status::kBinlogIteratorGetOk
kBinlogIteratorGetEndOfChangesBinlog_iterator_service_get_status::kBinlogIteratorGetEndOfChanges
kBinlogIteratorGetInsufficientBufferBinlog_iterator_service_get_status::kBinlogIteratorGetInsufficientBuffer
kBinlogIteratorGetErrorClosed
See also
Binlog_iterator_service_get_status::kBinlogIteratorGetErrorClosed
Return values
kBinlogIteratorGetErrorInvalid
See also
Binlog_iterator_service_get_status::kBinlogIteratorGetErrorInvalid
Return values
kBinlogIteratorGetErrorUnspecified
See also
Binlog_iterator_service_get_status::kBinlogIteratorGetErrorUnspecified

◆ get_next_entry_size

mysql_service_status_t(* s_mysql_binlog_storage_iterator::get_next_entry_size) (my_h_binlog_storage_iterator iterator, uint64_t *size)

Gets the size of the next entry to fetch from the iterator.

Useful to drive reallocations.

Parameters
[in]iteratorthe iterator being operated.
[out]sizea pointer to store the size of the next entry to get.
Returns
false on success, true otherwise. Note that if the iterator has reached the end of changes, then it means that an error shall be returned.

◆ get_storage_details

mysql_service_status_t(* s_mysql_binlog_storage_iterator::get_storage_details) (my_h_binlog_storage_iterator iterator, char *buffer, uint64_t *size)

Gets details about the entry's storage in a JSON format.

Allows the caller to get information about the underlying storage. Some implementations may return a name and a position, for instance.

Parameters
[in]iteratorthe iterator handle.
[in,out]bufferThe buffer to store the information in.
[in,out]sizeAs input, the size of the buffer provided. As output, the size of the data copied into the buffer.
Returns
true if there was an error, false otherwise.

◆ init

Binlog_iterator_service_init_status(* s_mysql_binlog_storage_iterator::init) (my_h_binlog_storage_iterator *iterator, const char *excluded_gtids_as_string)

Initializes the iterator.

my_h_binlog_storage_iterator is the service handle defined and is an opaque pointer to the stream state.

Parameters
[out]iteratorwhere the iterator created will be stored.
[in]excluded_gtids_as_stringThe set of GTIDs to filter out from the iterator.
Return values
kBinlogIteratorInitOk
See also
Binlog_iterator_service_init_status::kBinlogIteratorInitOk
Return values
kBinlogIteratorIniErrorPurgedGtids
See also
Binlog_iterator_service_init_status::kBinlogIteratorIniErrorPurgedGtids
Return values
kBinlogIteratorInitErrorLogClosed
See also
Binlog_iterator_service_init_status::kBinlogIteratorInitErrorLogClosed
Return values
kBinlogIteratorInitErrorUnspecified
See also
Binlog_iterator_service_init_status::kBinlogIteratorGetErrorUnspecified

The documentation for this struct was generated from the following file: