MySQL  8.0.19
Source Code Documentation
Rpl_transaction_ctx Class Reference

Server side support to provide a service to plugins to report if a given transaction should continue or be aborted. More...

#include <rpl_transaction_ctx.h>

Public Member Functions

 Rpl_transaction_ctx ()
 
virtual ~Rpl_transaction_ctx ()
 
int set_rpl_transaction_ctx (Transaction_termination_ctx transaction_termination_ctx)
 
bool is_transaction_rollback ()
 Get transaction outcome decision. More...
 
bool is_generated_gtid ()
 Was GTID generated externally? More...
 
int get_sidno ()
 Get transaction sidno. More...
 
long long int get_gno ()
 Get transaction gno. More...
 
void cleanup ()
 Reset transaction context to default values. More...
 

Private Attributes

Transaction_termination_ctx m_transaction_ctx
 

Detailed Description

Server side support to provide a service to plugins to report if a given transaction should continue or be aborted.

Its value is reset on Transaction_ctx::cleanup(). Its value is set through service service_rpl_transaction_ctx.

Constructor & Destructor Documentation

◆ Rpl_transaction_ctx()

Rpl_transaction_ctx::Rpl_transaction_ctx ( )

◆ ~Rpl_transaction_ctx()

virtual Rpl_transaction_ctx::~Rpl_transaction_ctx ( )
inlinevirtual

Member Function Documentation

◆ cleanup()

void Rpl_transaction_ctx::cleanup ( )

Reset transaction context to default values.

◆ get_gno()

rpl_gno Rpl_transaction_ctx::get_gno ( )

Get transaction gno.

Returns
gno gno value.

◆ get_sidno()

rpl_sidno Rpl_transaction_ctx::get_sidno ( )

Get transaction sidno.

Returns
sidno sidno value.

◆ is_generated_gtid()

bool Rpl_transaction_ctx::is_generated_gtid ( )

Was GTID generated externally?

Returns
Return values
trueGTID was generated.
falseGTID was not generated.

◆ is_transaction_rollback()

bool Rpl_transaction_ctx::is_transaction_rollback ( )

Get transaction outcome decision.

When both sidno and gno are equal or greater than zero, transaction should continue. By default sidno and gno are 0, transaction will continue.

Returns
Return values
trueTransaction should abort
falseTransaction should continue

◆ set_rpl_transaction_ctx()

int Rpl_transaction_ctx::set_rpl_transaction_ctx ( Transaction_termination_ctx  transaction_termination_ctx)

Member Data Documentation

◆ m_transaction_ctx

Transaction_termination_ctx Rpl_transaction_ctx::m_transaction_ctx
private

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