MySQL 8.0.39
Source Code Documentation
injector::transaction Class Reference

#include <rpl_injector.h>

Classes

class  binlog_pos
 
class  table
 

Public Types

typedef ucharrecord_type
 
typedef uint32 server_id_type
 

Public Member Functions

 transaction ()
 
 transaction (transaction const &)
 
 ~transaction ()
 
void clear ()
 
bool good () const
 
transactionoperator= (transaction t)
 
int use_table (server_id_type sid, table tbl)
 
int write_row (server_id_type sid, table tbl, MY_BITMAP const *cols, record_type record, const unsigned char *extra_row_info)
 
int write_row (server_id_type sid, table tbl, MY_BITMAP const *cols, record_type record)
 
int delete_row (server_id_type sid, table tbl, MY_BITMAP const *cols, record_type record, const unsigned char *extra_row_info)
 
int delete_row (server_id_type sid, table tbl, MY_BITMAP const *cols, record_type record)
 
int update_row (server_id_type sid, table tbl, MY_BITMAP const *before_cols, MY_BITMAP const *after_cols, record_type before, record_type after, const unsigned char *extra_row_info)
 
int update_row (server_id_type sid, table tbl, MY_BITMAP const *cols, record_type before, record_type after)
 
int commit ()
 
int rollback ()
 
binlog_pos start_pos () const
 
binlog_pos next_pos () const
 

Private Types

enum  enum_state { START_STATE , TABLE_STATE , ROW_STATE , STATE_COUNT }
 

Private Member Functions

 transaction (MYSQL_BIN_LOG *, THD *)
 
void swap (transaction &o)
 
int check_state (enum_state const target_state)
 

Private Attributes

enum injector::transaction::enum_state m_state
 
binlog_pos m_start_pos
 
binlog_pos m_next_pos
 
THDm_thd
 

Friends

class injector
 

Member Typedef Documentation

◆ record_type

◆ server_id_type

Member Enumeration Documentation

◆ enum_state

Enumerator
START_STATE 
TABLE_STATE 
ROW_STATE 
STATE_COUNT 

Constructor & Destructor Documentation

◆ transaction() [1/3]

injector::transaction::transaction ( )
inline

◆ transaction() [2/3]

injector::transaction::transaction ( transaction const &  )

◆ ~transaction()

injector::transaction::~transaction ( )

◆ transaction() [3/3]

injector::transaction::transaction ( MYSQL_BIN_LOG log,
THD thd 
)
inlineprivate

Member Function Documentation

◆ check_state()

int injector::transaction::check_state ( enum_state const  target_state)
inlineprivate

◆ clear()

void injector::transaction::clear ( )
inline

◆ commit()

int injector::transaction::commit ( )
Return values
0transaction committed
1transaction rolled back

◆ delete_row() [1/2]

int injector::transaction::delete_row ( server_id_type  sid,
table  tbl,
MY_BITMAP const *  cols,
record_type  record 
)

◆ delete_row() [2/2]

int injector::transaction::delete_row ( server_id_type  sid,
table  tbl,
MY_BITMAP const *  cols,
record_type  record,
const unsigned char *  extra_row_info 
)

◆ good()

bool injector::transaction::good ( ) const
inline

◆ next_pos()

injector::transaction::binlog_pos injector::transaction::next_pos ( ) const

◆ operator=()

transaction & injector::transaction::operator= ( transaction  t)
inline

◆ rollback()

int injector::transaction::rollback ( )

◆ start_pos()

injector::transaction::binlog_pos injector::transaction::start_pos ( ) const

◆ swap()

void injector::transaction::swap ( transaction o)
inlineprivate

◆ update_row() [1/2]

int injector::transaction::update_row ( server_id_type  sid,
table  tbl,
MY_BITMAP const *  before_cols,
MY_BITMAP const *  after_cols,
record_type  before,
record_type  after,
const unsigned char *  extra_row_info 
)

◆ update_row() [2/2]

int injector::transaction::update_row ( server_id_type  sid,
table  tbl,
MY_BITMAP const *  cols,
record_type  before,
record_type  after 
)

◆ use_table()

int injector::transaction::use_table ( server_id_type  sid,
table  tbl 
)

◆ write_row() [1/2]

int injector::transaction::write_row ( server_id_type  sid,
table  tbl,
MY_BITMAP const *  cols,
record_type  record 
)

◆ write_row() [2/2]

int injector::transaction::write_row ( server_id_type  sid,
table  tbl,
MY_BITMAP const *  cols,
record_type  record,
const unsigned char *  extra_row_info 
)

Friends And Related Function Documentation

◆ injector

friend class injector
friend

Member Data Documentation

◆ m_next_pos

binlog_pos injector::transaction::m_next_pos
private

◆ m_start_pos

binlog_pos injector::transaction::m_start_pos
private

◆ m_state

enum injector::transaction::enum_state injector::transaction::m_state
private

◆ m_thd

THD* injector::transaction::m_thd
private

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