An interface to delegate responsibility from MYSQL_BIN_LOG class.
More...
#include <binlog_tc_log_processing.h>
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.
◆ 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 |
◆ binlog_register_observer()
| virtual bool Binlog_tc_log_processing::binlog_register_observer |
( |
| ) |
|
|
pure virtual |
Register binlog observer.
- Return values
-
| true | It was possible to register binlog observer |
| false | It 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 |
◆ 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_logs | if 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
-
| thd | The THD session object holding the transaction to finalize. |
| all | Finalizing a transaction (i.e. true) or a statement (i.e. false). |
| run_after_commit | In 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
-
| true | Persistence is enabled |
| false | Persistence 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
-
| binlog | An instance of MYSQL_BIN_LOG upon which the prepare method executes |
| thd | The THD session object holding the transaction to be prepared. |
| all | Whether or not the prepare regards a full transaction or the statement being executed.. |
- Return values
-
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
-
| binlog | An instance of MYSQL_BIN_LOG upon which the process_flush_stage_queue method executes |
| [out] | total_bytes_var | Pointer to variable that will be set to total number of bytes flushed, or NULL. |
| [out] | out_queue_var | Pointer 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
-
| thd | THD session object. |
| all | Is 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: