MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Gtid Struct Reference

#include <rpl_gtid.h>

Public Member Functions

void clear ()
 Set both components to 0.
int to_string (const rpl_sid &sid, char *buf) const
int to_string (const Sid_map *sid_map, char *buf) const
bool equals (const Gtid &other) const
 Returns true if this Gtid has the same sid and gno as 'other'.
enum_return_status parse (Sid_map *sid_map, const char *text)
void print (const Sid_map *sid_map) const
 Debug only: print this Gtid to stdout.
void dbug_print (const Sid_map *sid_map, const char *text="") const
 Print this Gtid to the trace file if debug is enabled; no-op otherwise.

Static Public Member Functions

static bool is_valid (const char *text)

Public Attributes

rpl_sidno sidno
 SIDNO of this Gtid.
rpl_gno gno
 GNO of this Gtid.

Static Public Attributes

static const int MAX_TEXT_LENGTH = Uuid::TEXT_LENGTH + 1 + MAX_GNO_TEXT_LENGTH

Detailed Description

Holds information about a GTID: the sidno and the gno.

This is a POD. It has to be a POD because it is part of Gtid_specification, which has to be a POD because it is used in THD::variables.

Definition at line 754 of file rpl_gtid.h.

Member Function Documentation

bool Gtid::is_valid ( const char *  text)
static

Return true if parse() would succeed, but don't store the result anywhere.

Definition at line 104 of file rpl_gtid_misc.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

enum_return_status Gtid::parse ( Sid_map sid_map,
const char *  text 
)

Parses the given string and stores in this Gtid.

Parameters
textThe text to parse
Returns
RETURN_STATUS_OK or RETURN_STATUS_REPORTED_ERROR.

Definition at line 27 of file rpl_gtid_misc.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int Gtid::to_string ( const rpl_sid sid,
char *  buf 
) const

Convert a Gtid to a string.

Parameters
sidthe sid to use. This overrides the sidno of this Gtid.
[out]bufBuffer to store the Gtid in (normally MAX_TEXT_LENGTH+1 bytes long).
Returns
Length of the string, not counting '\0'.

Definition at line 85 of file rpl_gtid_misc.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

int Gtid::to_string ( const Sid_map sid_map,
char *  buf 
) const

Convert this Gtid to a string.

Parameters
sid_mapsid_map to use when converting sidno to a SID.
[out]bufBuffer to store the Gtid in (normally MAX_TEXT_LENGTH+1 bytes long).
Returns
Length of the string, not counting '\0'.

Definition at line 96 of file rpl_gtid_misc.cc.

Here is the call graph for this function:

Member Data Documentation

const int Gtid::MAX_TEXT_LENGTH = Uuid::TEXT_LENGTH + 1 + MAX_GNO_TEXT_LENGTH
static

The maximal length of the textual representation of a SID, not including the terminating '\0'.

Definition at line 767 of file rpl_gtid.h.


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