My Project
|
#include <log.h>
Public Types | |
enum | enum_result { RESULT_SUCCESS, RESULT_ABORTED, RESULT_INCONSISTENT } |
Public Member Functions | |
int | using_heuristic_recover () |
virtual int | open (const char *opt_name)=0 |
virtual void | close ()=0 |
virtual enum_result | commit (THD *thd, bool all)=0 |
virtual int | rollback (THD *thd, bool all)=0 |
virtual int | prepare (THD *thd, bool all)=0 |
Transaction Coordinator Log.
A base abstract class for three different implementations of the transaction coordinator.
The server uses the transaction coordinator to order transactions correctly and there are three different implementations: one using an in-memory structure, one dummy that does not do anything, and one using the binary log for transaction coordination.
virtual enum_result TC_LOG::commit | ( | THD * | thd, |
bool | all | ||
) | [pure virtual] |
Log a commit record of the transaction to the transaction coordinator log.
When the function returns, the transaction commit is properly logged to the transaction coordinator log and can be committed in the storage engines.
thd | Session to log transaction for. |
all | True if this is a "real" commit, false if it is a "statement" commit. |
Implemented in MYSQL_BIN_LOG, and TC_LOG_DUMMY.
virtual int TC_LOG::prepare | ( | THD * | thd, |
bool | all | ||
) | [pure virtual] |
Log a prepare record of the transaction to the storage engines.
thd | Session to log transaction record for. |
all | true if an explicit commit or an implicit commit for a statement, false if an internal commit of the statement. |
Implemented in MYSQL_BIN_LOG, and TC_LOG_DUMMY.
virtual int TC_LOG::rollback | ( | THD * | thd, |
bool | all | ||
) | [pure virtual] |
Log a rollback record of the transaction to the transaction coordinator log.
When the function returns, the transaction have been aborted in the transaction coordinator log.
thd | Session to log transaction record for. |
all | true if an explicit commit or an implicit commit for a statement, false if an internal commit of the statement. |
Implemented in MYSQL_BIN_LOG, and TC_LOG_DUMMY.
int TC_LOG::using_heuristic_recover | ( | ) |
Perform heuristic recovery, if --tc-heuristic-recover was used.
0 | no heuristic recovery was requested |
1 | heuristic recovery was performed |