MySQL 8.4.0
Source Code Documentation
Observe_transmission_guard Class Reference

Sentry class to guard the transitions for Delegate::m_observe_transmission flag within given contexts. More...

Public Member Functions

 Observe_transmission_guard (bool &flag, mysql::binlog::event::Log_event_type event_type, const char *event_ptr, mysql::binlog::event::enum_binlog_checksum_alg checksum_alg, mysql::binlog::event::Log_event_type prev_event_type)
 Constructor for the class. More...
 
 ~Observe_transmission_guard ()
 Destructor for the sentry class. More...
 

Private Attributes

bool m_saved
 The value of the guarded flag upon this object creation. More...
 
bool & m_to_set
 The flag variable to guard. More...
 

Detailed Description

Sentry class to guard the transitions for Delegate::m_observe_transmission flag within given contexts.

Constructor & Destructor Documentation

◆ Observe_transmission_guard()

Observe_transmission_guard::Observe_transmission_guard ( bool &  flag,
mysql::binlog::event::Log_event_type  event_type,
const char *  event_ptr,
mysql::binlog::event::enum_binlog_checksum_alg  checksum_alg,
mysql::binlog::event::Log_event_type  prev_event_type 
)
inline

Constructor for the class.

It will change the value of the flag parameter according with the event_type and event_ptr content. The flag will be set to true as follows:

  • The event is an XID_EVENT
  • The event is an XA_PREPARE_LOG_EVENT.
  • The event is a QUERY_EVENT with query equal to "XA COMMIT" or "XA ABORT" or "COMMIT".
  • The event is the first QUERY_EVENT after a GTID_EVENT and the query is not "BEGIN" –the statement is a DDL, for instance.
Parameters
flagThe flag variable to guard
event_typeThe type of the event being processed
event_ptrThe raw content of the event being processed
checksum_algThe checksum algorithm being used currently
prev_event_typeThe type of the event processed just before the current one

◆ ~Observe_transmission_guard()

Observe_transmission_guard::~Observe_transmission_guard ( )
inline

Destructor for the sentry class.

It will instantiate the guarded flag with the value prior to the creation of this object.

Member Data Documentation

◆ m_saved

bool Observe_transmission_guard::m_saved
private

The value of the guarded flag upon this object creation.

◆ m_to_set

bool& Observe_transmission_guard::m_to_set
private

The flag variable to guard.


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