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>
|
class | XID_STATE |
|
std::ostream & | operator<< (std::ostream &out, struct xid_t const &in) |
| Writes the parameter's in string representation to the out stream parameter object. More...
|
|
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
◆ xid_t()
◆ eq()
bool xid_t::eq |
( |
const xid_t * |
xid | ) |
const |
|
inline |
Check if equal to another xid.
- Parameters
-
[in] | xid | the id of another X/Open XA transaction |
- Returns
- true iff formats, gtrid_length, bqual_length and the content of gtrid_length+bqual_length bytes is exactly the same
◆ 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]
◆ key() [2/2]
const uchar * xid_t::key |
( |
| ) |
const |
|
inline |
◆ key_length()
uint xid_t::key_length |
( |
| ) |
const |
|
inline |
◆ null()
◆ operator!=()
Compares for inequality two instances of xid_t
.
- Parameters
-
rhs | The instance to compare this object with. |
- Returns
- true if both instance are different, false otherwise.
◆ operator<()
bool xid_t::operator< |
( |
struct xid_t const & |
rhs | ) |
const |
Compares for lower-than-inequality two instances of xid_t
.
The lesser-than relation between two given XIDs, x1 and x2, is as follows:
x1 < x2 if any of the following is true:
- x1[FORMAT_ID] < x2[FORMAT_ID]
- x1[strlen(GTRID)] < x2[strlen(GTRID)]
- x1[strlen(BQUAL)] < x2[strlen(BQUAL)]
- std::strncmp(x1[DATA], x2[DATA]) < 0
- Parameters
-
rhs | The instance to compare this object with. |
- Returns
- true if this instance is lesser than the parameter, false otherwise.
◆ operator=()
Instantiates this object with the contents of the parameter of type XA_prepare_event::MY_XID
.
The XA_prepare_event::MY_XID
is a mirror class of xid_t
so the instantiation is a direct instantiation relation of each class member variables.
- Parameters
-
rhs | The XA_prepare_event::MY_XID to instantiate from |
- Returns
- This object reference.
◆ operator==()
bool xid_t::operator== |
( |
struct xid_t const & |
rhs | ) |
const |
Compares for equality two instances of xid_t
.
- Parameters
-
rhs | The instance to compare this object with. |
- Returns
- true if both instance are equal, false otherwise.
◆ 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
-
- Returns
- the value of the first argument
◆ set() [1/3]
void xid_t::set |
( |
const xid_t * |
xid | ) |
|
|
inlineprivate |
◆ set() [2/3]
void xid_t::set |
( |
long |
f, |
|
|
const char * |
g, |
|
|
long |
gl, |
|
|
const char * |
b, |
|
|
long |
bl |
|
) |
| |
|
inline |
◆ set() [3/3]
◆ 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
-
buf | pointer to the buffer where printable XID value has to be stored |
- Returns
- pointer to the buffer passed in the first argument
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & |
out, |
|
|
struct xid_t const & |
in |
|
) |
| |
|
friend |
Writes the parameter's in
string representation to the out
stream parameter object.
- Parameters
-
out | The stream to write the XID representation to |
in | The XID for which the string representation should be written |
- Returns
- The reference for the stream passed on as parameter.
◆ XID_STATE
◆ bqual_length
◆ data
distributed trx identifier.
not \0-terminated.
◆ formatID
-1 means that the XID is null
◆ gtrid_length
◆ 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: