MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TC_LOG Class Reference

#include <log.h>

Inheritance diagram for TC_LOG:

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

Detailed Description

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.

Definition at line 48 of file log.h.

Member Function Documentation

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.

Parameters
thdSession to log transaction for.
allTrue if this is a "real" commit, false if it is a "statement" commit.
Returns
Error code on failure, zero on success.

Implemented in TC_LOG_DUMMY.

Here is the caller graph for this function:

virtual int TC_LOG::prepare ( THD *  thd,
bool  all 
)
pure virtual

Log a prepare record of the transaction to the storage engines.

Parameters
thdSession to log transaction record for.
alltrue if an explicit commit or an implicit commit for a statement, false if an internal commit of the statement.
Returns
Error code on failure, zero on success.

Implemented in TC_LOG_DUMMY.

Here is the caller graph for this function:

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.

Parameters
thdSession to log transaction record for.
alltrue if an explicit commit or an implicit commit for a statement, false if an internal commit of the statement.
Returns
Error code on failure, zero on success.

Implemented in TC_LOG_DUMMY.

Here is the caller graph for this function:

int TC_LOG::using_heuristic_recover ( )

Perform heuristic recovery, if –tc-heuristic-recover was used.

Note
no matter whether heuristic recovery was successful or not mysqld must exit. So, return value is the same in both cases.
Return values
0no heuristic recovery was requested
1heuristic recovery was performed

Definition at line 2914 of file log.cc.

Here is the caller graph for this function:


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