MySQL 26.7.0
Source Code Documentation
Binlog_tc_log Class Reference

#include <binlog_tc_log.h>

Inheritance diagram for Binlog_tc_log:
[legend]

Public Member Functions

 Binlog_tc_log ()
 
virtual ~Binlog_tc_log () override
 
virtual int prepare (MYSQL_BIN_LOG *binlog, THD *thd, bool all) override
 Prepare the transaction in the transaction coordinator. More...
 
virtual THDfetch_and_process_flush_stage_queue (bool check_and_skip_flush_logs) override
 Fetch and empty BINLOG_FLUSH_STAGE and COMMIT_ORDER_FLUSH_STAGE flush queues and flush transactions to the disk, and unblock threads executing slave preserve commit order. More...
 
virtual int process_flush_stage_queue (MYSQL_BIN_LOG *binlog, my_off_t *total_bytes_var, THD **out_queue_var) override
 Execute the flush stage. More...
 
virtual bool rollback_in_engines (THD *thd, bool all) override
 Rolls back the underlying transaction in storage engines. More...
 
virtual void finish_transaction_in_engines (THD *thd, bool all, bool run_after_commit) override
 Finishes the transaction in the engines. More...
 
virtual bool binlog_register_observer () override
 Register binlog observer. More...
 
virtual void binlog_unregister_observer () override
 Unregister binlog observer. More...
 
virtual bool is_persistence_enabled () override
 Is persistence enabled. More...
 
- Public Member Functions inherited from Binlog_tc_log_processing
 Binlog_tc_log_processing ()=default
 
virtual ~Binlog_tc_log_processing ()=default
 

Detailed Description

See also
Binlog_tc_log_processing for class and its methods documentation

Constructor & Destructor Documentation

◆ Binlog_tc_log()

Binlog_tc_log::Binlog_tc_log ( )

◆ ~Binlog_tc_log()

Binlog_tc_log::~Binlog_tc_log ( )
overridevirtual

Member Function Documentation

◆ binlog_register_observer()

bool Binlog_tc_log::binlog_register_observer ( )
overridevirtual

Register binlog observer.

Return values
trueIt was possible to register binlog observer
falseIt was not possible to register binlog observer

Implements Binlog_tc_log_processing.

◆ binlog_unregister_observer()

void Binlog_tc_log::binlog_unregister_observer ( )
overridevirtual

Unregister binlog observer.

Implements Binlog_tc_log_processing.

◆ fetch_and_process_flush_stage_queue()

THD * Binlog_tc_log::fetch_and_process_flush_stage_queue ( bool  check_and_skip_flush_logs)
overridevirtual

Fetch and empty BINLOG_FLUSH_STAGE and COMMIT_ORDER_FLUSH_STAGE flush queues and flush transactions to the disk, and unblock threads executing slave preserve commit order.

Parameters
[in]check_and_skip_flush_logsif false then flush prepared records of transactions to the log of storage engine. if true then flush prepared records of transactions to the log of storage engine only if COMMIT_ORDER_FLUSH_STAGE queue is non-empty.
Returns
Pointer to the first session of the BINLOG_FLUSH_STAGE stage queue.

Implements Binlog_tc_log_processing.

◆ finish_transaction_in_engines()

void Binlog_tc_log::finish_transaction_in_engines ( THD thd,
bool  all,
bool  run_after_commit 
)
overridevirtual

Finishes the transaction in the engines.

If the commit_low flag is set, will commit in the engines, otherwise, if the underlying statement is an XA ROLLBACK, it will rollback in the engines.

Parameters
thdThe THD session object holding the transaction to finalize.
allFinalizing a transaction (i.e. true) or a statement (i.e. false).
run_after_commitIn the case of a commit being issued, whether or not to run the after_commit hook.

Implements Binlog_tc_log_processing.

◆ is_persistence_enabled()

bool Binlog_tc_log::is_persistence_enabled ( )
overridevirtual

Is persistence enabled.

Return values
truePersistence is enabled
falsePersistence is disabled

Implements Binlog_tc_log_processing.

◆ prepare()

int Binlog_tc_log::prepare ( MYSQL_BIN_LOG binlog,
THD thd,
bool  all 
)
overridevirtual

Prepare the transaction in the transaction coordinator.

Parameters
binlogAn instance of MYSQL_BIN_LOG upon which the prepare method executes
thdThe THD session object holding the transaction to be prepared.
allWhether or not the prepare regards a full transaction or the statement being executed..
Return values
0success
1error

Implements Binlog_tc_log_processing.

◆ process_flush_stage_queue()

int Binlog_tc_log::process_flush_stage_queue ( MYSQL_BIN_LOG binlog,
my_off_t total_bytes_var,
THD **  out_queue_var 
)
overridevirtual

Execute the flush stage.

Parameters
binlogAn instance of MYSQL_BIN_LOG upon which the process_flush_stage_queue method executes
[out]total_bytes_varPointer to variable that will be set to total number of bytes flushed, or NULL.
[out]out_queue_varPointer to the sessions queue in flush stage.
Returns
Error code on error, zero on success

Implements Binlog_tc_log_processing.

◆ rollback_in_engines()

bool Binlog_tc_log::rollback_in_engines ( THD thd,
bool  all 
)
overridevirtual

Rolls back the underlying transaction in storage engines.

Determines if the transaction to rollback is attached to the thd parameter or, instead, the thd parameter holds the XID for a detached transaction to be rolled back.

Parameters
thdTHD session object.
allIs set in case of explicit commit (COMMIT statement), or implicit commit issued by DDL. Is not set when called at the end of statement, even if autocommit=1.
Returns
false if the transaction was rolled back, true if an error occurred.

Implements Binlog_tc_log_processing.


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