MySQL 8.0.29
Source Code Documentation
binlog_trx_cache_data Class Reference
Inheritance diagram for binlog_trx_cache_data:

Public Member Functions

 binlog_trx_cache_data (bool trx_cache_arg, ulong *ptr_binlog_cache_use_arg, ulong *ptr_binlog_cache_disk_use_arg)
void reset () override
 Reset the cache to unused state when the transaction is finished. More...
bool cannot_rollback () const
void set_cannot_rollback ()
my_off_t get_prev_position () const
void set_prev_position (my_off_t pos)
void restore_prev_position ()
void restore_savepoint (my_off_t pos)
int truncate (THD *thd, bool all)
 This function truncates the transactional cache upon committing or rolling back either a transaction or a statement. More...
void truncate (my_off_t pos)
- Public Member Functions inherited from binlog_cache_data
 binlog_cache_data (bool trx_cache_arg, ulong *ptr_binlog_cache_use_arg, ulong *ptr_binlog_cache_disk_use_arg)
bool open (my_off_t cache_size, my_off_t max_cache_size)
Binlog_cache_storageget_cache ()
int finalize (THD *thd, Log_event *end_event)
 This function finalizes the cache preparing for commit or rollback. More...
int finalize (THD *thd, Log_event *end_event, XID_STATE *xs)
 The method writes XA END query to XA-prepared transaction's cache and calls the "basic" finalize(). More...
int flush (THD *thd, my_off_t *bytes, bool *wrote_xid)
 Flush caches to the binary log. More...
int write_event (Log_event *event)
size_t get_event_counter ()
size_t get_compressed_size ()
size_t get_decompressed_size ()
binary_log::transaction::compression::type get_compression_type ()
void set_compressed_size (size_t s)
void set_decompressed_size (size_t s)
void set_compression_type (binary_log::transaction::compression::type t)
virtual ~binlog_cache_data ()
bool is_binlog_empty () const
bool is_finalized () const
Rows_log_eventpending () const
void set_pending (Rows_log_event *const pending)
void set_incident (void)
bool has_incident (void) const
bool has_xid () const
bool is_trx_cache () const
my_off_t get_byte_position () const
void cache_state_checkpoint (my_off_t pos_to_checkpoint)
void cache_state_rollback (my_off_t pos_to_rollback)
bool may_have_sbr_stmts ()
 Returns information about the cache content with respect to the binlog_format of the events. More...
bool has_empty_transaction ()
 Check if the binlog cache contains an empty transaction, which has two binlog events "BEGIN" and "COMMIT". More...
bool is_empty_or_has_empty_transaction ()
 Check if the binlog cache is empty or contains an empty transaction, which has two binlog events "BEGIN" and "COMMIT". More...

Private Member Functions

binlog_trx_cache_dataoperator= (const binlog_trx_cache_data &info)
 binlog_trx_cache_data (const binlog_trx_cache_data &info)

Private Attributes

bool m_cannot_rollback
my_off_t before_stmt_pos

Additional Inherited Members

- Protected Member Functions inherited from binlog_cache_data
void truncate (my_off_t pos)
int flush_pending_event (THD *thd)
 Flush pending event to the cache buffer. More...
int remove_pending_event ()
 Remove the pending event. More...
virtual bool compress (THD *)
- Protected Attributes inherited from binlog_cache_data
std::map< my_off_t, cache_statecache_state_map
size_t event_counter = 0
size_t m_compressed_size = 0
size_t m_decompressed_size = 0
binary_log::transaction::compression::type m_compression_type
struct binlog_cache_data::Flags flags

Constructor & Destructor Documentation

◆ binlog_trx_cache_data() [1/2]

binlog_trx_cache_data::binlog_trx_cache_data ( bool  trx_cache_arg,
ulong *  ptr_binlog_cache_use_arg,
ulong *  ptr_binlog_cache_disk_use_arg 

◆ binlog_trx_cache_data() [2/2]

binlog_trx_cache_data::binlog_trx_cache_data ( const binlog_trx_cache_data info)

Member Function Documentation

◆ cannot_rollback()

bool binlog_trx_cache_data::cannot_rollback ( ) const

◆ get_prev_position()

my_off_t binlog_trx_cache_data::get_prev_position ( ) const

◆ operator=()

binlog_trx_cache_data & binlog_trx_cache_data::operator= ( const binlog_trx_cache_data info)

◆ reset()

void binlog_trx_cache_data::reset ( )

Reset the cache to unused state when the transaction is finished.

It drops all data in the cache and clears the flags of the transaction state.

Reimplemented from binlog_cache_data.

◆ restore_prev_position()

void binlog_trx_cache_data::restore_prev_position ( )

◆ restore_savepoint()

void binlog_trx_cache_data::restore_savepoint ( my_off_t  pos)

◆ set_cannot_rollback()

void binlog_trx_cache_data::set_cannot_rollback ( )

◆ set_prev_position()

void binlog_trx_cache_data::set_prev_position ( my_off_t  pos)

◆ truncate()

void binlog_cache_data::truncate ( my_off_t  pos)

Member Data Documentation

◆ before_stmt_pos

my_off_t binlog_trx_cache_data::before_stmt_pos

◆ m_cannot_rollback

bool binlog_trx_cache_data::m_cannot_rollback

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