MySQL 8.0.40
Source Code Documentation
|
Binary codec for the transaction payload log event. More...
#include <binary.h>
Public Types | |
enum | fields { OTW_PAYLOAD_HEADER_END_MARK = 0 , OTW_PAYLOAD_SIZE_FIELD = 1 , OTW_PAYLOAD_COMPRESSION_TYPE_FIELD = 2 , OTW_PAYLOAD_UNCOMPRESSED_SIZE_FIELD = 3 } |
The on-the-wire fields. More... | |
Public Member Functions | |
Transaction_payload ()=default | |
std::pair< std::size_t, bool > | decode (const unsigned char *from, std::size_t size, Binary_log_event &to) const override |
This member function shall decode the contents of the buffer provided and fill in the event referenced. More... | |
std::pair< std::size_t, bool > | encode (const Binary_log_event &from, unsigned char *to, std::size_t size) const override |
This member function shall encode the contents of the event referenced and store the result in the buffer provided. More... | |
Public Member Functions inherited from binary_log::codecs::binary::Base_codec | |
~Base_codec () override=default | |
Public Member Functions inherited from binary_log::codecs::Codec | |
virtual | ~Codec ()=default |
Additional Inherited Members | |
Protected Member Functions inherited from binary_log::codecs::binary::Base_codec | |
Event_reader & | reader () |
Protected Attributes inherited from binary_log::codecs::binary::Base_codec | |
Event_reader * | m_reader |
Binary codec for the transaction payload log event.
|
default |
|
overridevirtual |
This member function shall decode the contents of the buffer provided and fill in the event referenced.
This is the decoder member function for the TLV encoded set of values for the Transaction payload event.
Note that the event provided needs to be of type TRANSACTION_PAYLOAD_EVENT.
from | the buffer to decode |
size | the size of the buffer to decode. |
to | the event to store the decoded information into. |
Note that the log event must have the appropriate type code: TRANSACTION_PAYLOAD_EVENT to be compatible with this specific decoder. If it is not, an error shall be returned
from | the buffer to decode from. |
size | the buffer size. |
to | The log event to decode to. |
Implements binary_log::codecs::binary::Base_codec.
|
overridevirtual |
This member function shall encode the contents of the event referenced and store the result in the buffer provided.
This is the encoder member function for the TLV encoded set of values for the Transaction payload event.
Note that the event referenced needs to be of type TRANSACTION_PAYLOAD_EVENT.
from | the event to encode. |
to | the buffer where to store the encoded event. |
size | the size of the buffer. |
Note that the log event must have the appropriate type code: TRANSACTION_PAYLOAD_EVENT to be compatible with this specific enccoder. If it is not, an error shall be returned
from | The log event to decode to. |
to | the buffer to decode from. |
size | the buffer size. |
Implements binary_log::codecs::binary::Base_codec.