MySQL 8.4.3
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 ()=default
 
int set_rpl_transaction_ctx (Transaction_termination_ctx transaction_termination_ctx)
 
bool is_transaction_rollback ()
 Get transaction outcome decision. More...
 
int get_sidno () const
 Get transaction sidno. More...
 
rpl_gno get_gno () const
 Get transaction gno. More...
 
void set_sidno (rpl_sidno sidno)
 Sets transaction sidno. More...
 
std::pair< rpl_sidno, rpl_gnoget_gtid_components () const
 Transaction GTID components accessor. 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 ( )
virtualdefault

Member Function Documentation

◆ cleanup()

void Rpl_transaction_ctx::cleanup ( )

Reset transaction context to default values.

◆ get_gno()

rpl_gno Rpl_transaction_ctx::get_gno ( ) const

Get transaction gno.

Returns
gno gno value.

◆ get_gtid_components()

std::pair< rpl_sidno, rpl_gno > Rpl_transaction_ctx::get_gtid_components ( ) const

Transaction GTID components accessor.

Returns
SIDNO, GTID GNO

◆ get_sidno()

rpl_sidno Rpl_transaction_ctx::get_sidno ( ) const

Get transaction sidno.

Returns
sidno sidno value.

◆ 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.

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)

◆ set_sidno()

void Rpl_transaction_ctx::set_sidno ( rpl_sidno  sidno)

Sets transaction sidno.

Parameters
sidnosidno value

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: