MySQL 9.1.0
Source Code Documentation
gr::Certified_gtid Class Reference

Class that aggregates important information about already certified gtid. More...

#include <certified_gtid.h>

Public Member Functions

 Certified_gtid (const Gtid &server_gtid, const Gtid &group_gtid, bool is_gtid_specified, bool is_local, const Certification_result &cert_result=Certification_result::negative)
 Constructs Certified_gtid object. More...
 
 Certified_gtid (bool is_gtid_specified, bool is_local)
 Constructor, sets default gtids. More...
 
 Certified_gtid (const Certified_gtid &src)=default
 Copying constructor. More...
 
Certified_gtidoperator= (const Certified_gtid &src)=default
 Assignment operator. More...
 
const Gtidget_server_gtid () const
 Returns server representation of the GTID (global used in binlog) More...
 
const Gtidget_group_gtid () const
 Accesses Group representation of the GTID. More...
 
const Certification_resultget_cert_result () const
 Certification result accessor. More...
 
bool is_local () const
 Checks whether transaction originates from this server. More...
 
bool is_specified_gtid () const
 Returns true in case certified GTID was a specified GTID. More...
 

Private Attributes

Gtid m_server_gtid
 Global representation of the GTID. More...
 
Gtid m_group_gtid
 group representation gtid the way gtid is seen by the group More...
 
bool m_is_local = true
 Indication whether this is a local GTID. More...
 
bool m_is_gtid_specified = false
 True if GTID was specified before certification. More...
 
Certification_result m_cert = Certification_result::negative
 Certification result obtained from the certify function. More...
 

Detailed Description

Class that aggregates important information about already certified gtid.

GTID consists of TSID and transaction number. Due to the fact that TSID is represented internally by the number relative to the used sidno map, there are as many GTID representations as maps used (snapshot map / global server map used in TC / group sid map...) Certified GTID provides information about server representation of the GTID (used globally in the TC) and group representation of the GTID (group gtid). Other information used in the code and aggregated inside of this class is: type of the certified GTID, certification result (negative/positive/negative-error) and information whether this GTID is local to the current server performing certification

Constructor & Destructor Documentation

◆ Certified_gtid() [1/3]

gr::Certified_gtid::Certified_gtid ( const Gtid server_gtid,
const Gtid group_gtid,
bool  is_gtid_specified,
bool  is_local,
const Certification_result cert_result = Certification_result::negative 
)

Constructs Certified_gtid object.

Parameters
server_gtidGTID as seen by server (global)
group_gtidGTID as seen by group (local to group)
is_gtid_specifiedTrue if GTID is specified
is_localpass true if transaction originates from this server
cert_resultObtained certification result for transaction

◆ Certified_gtid() [2/3]

gr::Certified_gtid::Certified_gtid ( bool  is_gtid_specified,
bool  is_local 
)

Constructor, sets default gtids.

Parameters
is_gtid_specifiedTrue if GTID is specified
is_localpass true if transaction originates from this server

◆ Certified_gtid() [3/3]

gr::Certified_gtid::Certified_gtid ( const Certified_gtid src)
default

Copying constructor.

Parameters
srcPattern to be copied from

Member Function Documentation

◆ get_cert_result()

const Certification_result & gr::Certified_gtid::get_cert_result ( ) const

Certification result accessor.

Returns
Certification result

◆ get_group_gtid()

const Gtid & gr::Certified_gtid::get_group_gtid ( ) const

Accesses Group representation of the GTID.

Returns
Group representation of the GTID

◆ get_server_gtid()

const Gtid & gr::Certified_gtid::get_server_gtid ( ) const

Returns server representation of the GTID (global used in binlog)

Returns
Server representation of the GTID (global used in binlog)

◆ is_local()

bool gr::Certified_gtid::is_local ( ) const

Checks whether transaction originates from this server.

Returns
true if transaction originates from this server

◆ is_specified_gtid()

bool gr::Certified_gtid::is_specified_gtid ( ) const

Returns true in case certified GTID was a specified GTID.

◆ operator=()

Certified_gtid & gr::Certified_gtid::operator= ( const Certified_gtid src)
default

Assignment operator.

Parameters
srcPattern to be copied from
Returns
Reference to this object

Member Data Documentation

◆ m_cert

Certification_result gr::Certified_gtid::m_cert = Certification_result::negative
private

Certification result obtained from the certify function.

◆ m_group_gtid

Gtid gr::Certified_gtid::m_group_gtid
private

group representation gtid the way gtid is seen by the group

◆ m_is_gtid_specified

bool gr::Certified_gtid::m_is_gtid_specified = false
private

True if GTID was specified before certification.

◆ m_is_local

bool gr::Certified_gtid::m_is_local = true
private

Indication whether this is a local GTID.

◆ m_server_gtid

Gtid gr::Certified_gtid::m_server_gtid
private

Global representation of the GTID.


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