MySQL  8.0.17
Source Code Documentation
xid_t Struct Reference

struct xid_t is binary compatible with the XID structure as in the X/Open CAE Specification, Distributed Transaction Processing: The XA Specification, X/Open Company Ltd., 1991. More...

#include <xa.h>

Public Member Functions

 xid_t ()
 
long get_format_id () const
 
void set_format_id (long v)
 
long get_gtrid_length () const
 
void set_gtrid_length (long v)
 
long get_bqual_length () const
 
void set_bqual_length (long v)
 
const char * get_data () const
 
void set_data (const void *v, long l)
 
void reset ()
 
void set (long f, const char *g, long gl, const char *b, long bl)
 
my_xid get_my_xid () const
 
ucharkey ()
 
const ucharkey () const
 
uint key_length () const
 
char * serialize (char *buf) const
 The method fills XID in a buffer in format of GTRID,BQUAL,FORMATID where GTRID, BQUAL are represented as hex strings. More...
 
char * xid_to_str (char *buf) const
 Get printable XID value. More...
 
bool eq (const xid_t *xid) const
 
bool is_null () const
 

Static Public Attributes

static const uint ser_buf_size = 8 + 2 * XIDDATASIZE + 4 * sizeof(long) + 1
 

Private Member Functions

void set (const xid_t *xid)
 
void set (my_xid xid)
 
void null ()
 

Private Attributes

long formatID
 -1 means that the XID is null More...
 
long gtrid_length
 value from 1 through 64 More...
 
long bqual_length
 value from 1 through 64 More...
 
char data [XIDDATASIZE]
 distributed trx identifier. More...
 

Friends

class XID_STATE
 

Detailed Description

struct xid_t is binary compatible with the XID structure as in the X/Open CAE Specification, Distributed Transaction Processing: The XA Specification, X/Open Company Ltd., 1991.

http://www.opengroup.org/bookstore/catalog/c193.htm

See also
MYSQL_XID in mysql/plugin.h

Constructor & Destructor Documentation

◆ xid_t()

xid_t::xid_t ( )
inline

Member Function Documentation

◆ eq()

bool xid_t::eq ( const xid_t xid) const
inline

◆ get_bqual_length()

long xid_t::get_bqual_length ( ) const
inline

◆ get_data()

const char* xid_t::get_data ( ) const
inline

◆ get_format_id()

long xid_t::get_format_id ( ) const
inline

◆ get_gtrid_length()

long xid_t::get_gtrid_length ( ) const
inline

◆ get_my_xid()

my_xid xid_t::get_my_xid ( ) const

◆ is_null()

bool xid_t::is_null ( ) const
inline

◆ key() [1/2]

uchar* xid_t::key ( )
inline

◆ key() [2/2]

const uchar* xid_t::key ( ) const
inline

◆ key_length()

uint xid_t::key_length ( ) const
inline

◆ null()

void xid_t::null ( )
inlineprivate

◆ reset()

void xid_t::reset ( void  )
inline

◆ serialize()

char* xid_t::serialize ( char *  buf) const
inline

The method fills XID in a buffer in format of GTRID,BQUAL,FORMATID where GTRID, BQUAL are represented as hex strings.

Parameters
bufa pointer to buffer
Returns
the value of the first argument

◆ set() [1/3]

void xid_t::set ( long  f,
const char *  g,
long  gl,
const char *  b,
long  bl 
)
inline

◆ set() [2/3]

void xid_t::set ( const xid_t xid)
inlineprivate

◆ set() [3/3]

void xid_t::set ( my_xid  xid)
private

◆ set_bqual_length()

void xid_t::set_bqual_length ( long  v)
inline

◆ set_data()

void xid_t::set_data ( const void *  v,
long  l 
)
inline

◆ set_format_id()

void xid_t::set_format_id ( long  v)
inline

◆ set_gtrid_length()

void xid_t::set_gtrid_length ( long  v)
inline

◆ xid_to_str()

char * XID::xid_to_str ( char *  buf) const

Get printable XID value.

Parameters
bufpointer to the buffer where printable XID value has to be stored
Returns
pointer to the buffer passed in the first argument

Friends And Related Function Documentation

◆ XID_STATE

friend class XID_STATE
friend

Member Data Documentation

◆ bqual_length

long xid_t::bqual_length
private

value from 1 through 64

◆ data

char xid_t::data[XIDDATASIZE]
private

distributed trx identifier.

not \0-terminated.

◆ formatID

long xid_t::formatID
private

-1 means that the XID is null

◆ gtrid_length

long xid_t::gtrid_length
private

value from 1 through 64

◆ ser_buf_size

const uint xid_t::ser_buf_size = 8 + 2 * XIDDATASIZE + 4 * sizeof(long) + 1
static

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