MySQL 26.7.0
Source Code Documentation
Binlog_tc_log_processing Class Referenceabstract

An interface to delegate responsibility from MYSQL_BIN_LOG class. More...

#include <binlog_tc_log_processing.h>

Inheritance diagram for Binlog_tc_log_processing:
[legend]

Public Member Functions

 Binlog_tc_log_processing ()=default
 
virtual ~Binlog_tc_log_processing ()=default
 
virtual int prepare (MYSQL_BIN_LOG *binlog, THD *thd, bool all)=0
 Prepare the transaction in the transaction coordinator. More...
 
virtual THDfetch_and_process_flush_stage_queue (bool check_and_skip_flush_logs)=0
 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)=0
 Execute the flush stage. More...
 
virtual bool rollback_in_engines (THD *thd, bool all)=0
 Rolls back the underlying transaction in storage engines. More...
 
virtual void finish_transaction_in_engines (THD *thd, bool all, bool run_after_commit)=0
 Finishes the transaction in the engines. More...
 
virtual bool binlog_register_observer ()=0
 Register binlog observer. More...
 
virtual void binlog_unregister_observer ()=0
 Unregister binlog observer. More...
 
virtual bool is_persistence_enabled ()=0
 Is persistence enabled. More...
 

Detailed Description

An interface to delegate responsibility from MYSQL_BIN_LOG class.

Specific implementation is injected into an instance of MYSQL_BIN_LOG class using set_tc_log_processing method. See Binlog_tc_log class for specific generic implementation of the below interface.

Constructor & Destructor Documentation

◆ Binlog_tc_log_processing()

Binlog_tc_log_processing::Binlog_tc_log_processing ( )
default

◆ ~Binlog_tc_log_processing()

virtual Binlog_tc_log_processing::~Binlog_tc_log_processing ( )
virtualdefault

Member Function Documentation

◆ binlog_register_observer()

virtual bool Binlog_tc_log_processing::binlog_register_observer ( )
pure virtual

Register binlog observer.

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

Implemented in Binlog_tc_log.

◆ binlog_unregister_observer()

virtual void Binlog_tc_log_processing::binlog_unregister_observer ( )
pure virtual

Unregister binlog observer.

Implemented in Binlog_tc_log.

◆ fetch_and_process_flush_stage_queue()

virtual THD * Binlog_tc_log_processing::fetch_and_process_flush_stage_queue ( bool  check_and_skip_flush_logs)
pure virtual

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.

Implemented in Binlog_tc_log.

◆ finish_transaction_in_engines()

virtual void Binlog_tc_log_processing::finish_transaction_in_engines ( THD thd,
bool  all,
bool  run_after_commit 
)
pure virtual

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.

Implemented in Binlog_tc_log.

◆ is_persistence_enabled()

virtual bool Binlog_tc_log_processing::is_persistence_enabled ( )
pure virtual

Is persistence enabled.

Return values
truePersistence is enabled
falsePersistence is disabled

Implemented in Binlog_tc_log.

◆ prepare()

virtual int Binlog_tc_log_processing::prepare ( MYSQL_BIN_LOG binlog,
THD thd,
bool  all 
)
pure virtual

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

Implemented in Binlog_tc_log.

◆ process_flush_stage_queue()

virtual int Binlog_tc_log_processing::process_flush_stage_queue ( MYSQL_BIN_LOG binlog,
my_off_t total_bytes_var,
THD **  out_queue_var 
)
pure virtual

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

Implemented in Binlog_tc_log.

◆ rollback_in_engines()

virtual bool Binlog_tc_log_processing::rollback_in_engines ( THD thd,
bool  all 
)
pure virtual

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.

Implemented in Binlog_tc_log.


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