MySQL  8.0.18
Source Code Documentation
Rpl_transaction_write_set_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_write_set_ctx.h>

Public Member Functions

 Rpl_transaction_write_set_ctx ()
 
virtual ~Rpl_transaction_write_set_ctx ()
 
void add_write_set (uint64 hash)
 
std::vector< uint64 > * get_write_set ()
 
void clear_write_set ()
 
void set_has_missing_keys ()
 
bool get_has_missing_keys ()
 
void set_has_related_foreign_keys ()
 
bool get_has_related_foreign_keys ()
 
void add_savepoint (char *name)
 Function to add a new SAVEPOINT identifier in the savepoint map in the transaction_ctx object. More...
 
void del_savepoint (char *name)
 Function to delete a SAVEPOINT identifier in the savepoint map in the transaction_ctx object. More...
 
void rollback_to_savepoint (char *name)
 Function to delete all data added to write set and savepoint since SAVEPOINT identifier was added to savepoinbt in the transaction_ctx object. More...
 
void reset_savepoint_list ()
 Function to push savepoint data to a list and clear the savepoint map in order to create another identifier context, needed on functions ant trigger. More...
 
void restore_savepoint_list ()
 Restore previous savepoint map context, called after executed trigger or function. More...
 

Private Attributes

std::vector< uint64write_set
 
bool m_has_missing_keys
 
bool m_has_related_foreign_keys
 
std::map< std::string, size_t > savepoint
 Contains information related to SAVEPOINTs. More...
 
std::list< std::map< std::string, size_t > > savepoint_list
 Create a savepoint context hierarchy to support encapsulation of identifier name when function or trigger are executed. More...
 

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_write_set_ctx()

Rpl_transaction_write_set_ctx::Rpl_transaction_write_set_ctx ( )

◆ ~Rpl_transaction_write_set_ctx()

virtual Rpl_transaction_write_set_ctx::~Rpl_transaction_write_set_ctx ( )
inlinevirtual

Member Function Documentation

◆ add_savepoint()

void Rpl_transaction_write_set_ctx::add_savepoint ( char *  name)

Function to add a new SAVEPOINT identifier in the savepoint map in the transaction_ctx object.

Parameters
[in]name- the identifier name of the SAVEPOINT.

◆ add_write_set()

void Rpl_transaction_write_set_ctx::add_write_set ( uint64  hash)

◆ clear_write_set()

void Rpl_transaction_write_set_ctx::clear_write_set ( )

◆ del_savepoint()

void Rpl_transaction_write_set_ctx::del_savepoint ( char *  name)

Function to delete a SAVEPOINT identifier in the savepoint map in the transaction_ctx object.

Parameters
[in]name- the identifier name of the SAVEPOINT.

◆ get_has_missing_keys()

bool Rpl_transaction_write_set_ctx::get_has_missing_keys ( )

◆ get_has_related_foreign_keys()

bool Rpl_transaction_write_set_ctx::get_has_related_foreign_keys ( )

◆ get_write_set()

std::vector< uint64 > * Rpl_transaction_write_set_ctx::get_write_set ( )

◆ reset_savepoint_list()

void Rpl_transaction_write_set_ctx::reset_savepoint_list ( )

Function to push savepoint data to a list and clear the savepoint map in order to create another identifier context, needed on functions ant trigger.

◆ restore_savepoint_list()

void Rpl_transaction_write_set_ctx::restore_savepoint_list ( )

Restore previous savepoint map context, called after executed trigger or function.

◆ rollback_to_savepoint()

void Rpl_transaction_write_set_ctx::rollback_to_savepoint ( char *  name)

Function to delete all data added to write set and savepoint since SAVEPOINT identifier was added to savepoinbt in the transaction_ctx object.

Parameters
[in]name- the identifier name of the SAVEPOINT.

◆ set_has_missing_keys()

void Rpl_transaction_write_set_ctx::set_has_missing_keys ( )

◆ set_has_related_foreign_keys()

void Rpl_transaction_write_set_ctx::set_has_related_foreign_keys ( )

Member Data Documentation

◆ m_has_missing_keys

bool Rpl_transaction_write_set_ctx::m_has_missing_keys
private

◆ m_has_related_foreign_keys

bool Rpl_transaction_write_set_ctx::m_has_related_foreign_keys
private

◆ savepoint

std::map<std::string, size_t> Rpl_transaction_write_set_ctx::savepoint
private

Contains information related to SAVEPOINTs.

The key on map is the identifier and the value is the size of write set when command was executed.

◆ savepoint_list

std::list<std::map<std::string, size_t> > Rpl_transaction_write_set_ctx::savepoint_list
private

Create a savepoint context hierarchy to support encapsulation of identifier name when function or trigger are executed.

◆ write_set

std::vector<uint64> Rpl_transaction_write_set_ctx::write_set
private

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