My Project
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
Gtid Struct Reference

#include <rpl_gtid.h>

List of all members.

Public Member Functions

void clear ()
 Set both components to 0.
void set (rpl_sidno sno, rpl_gno gtidno)
bool empty () const
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


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.

Member Function Documentation

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

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

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

Parses the given string and stores in this Gtid.

textThe text to parse
int Gtid::to_string ( const rpl_sid sid,
char *  buf 
) const

Convert a Gtid to a string.

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).
Length of the string, not counting '\0'.
int Gtid::to_string ( const Sid_map sid_map,
char *  buf 
) const

Convert this Gtid to a string.

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).
Length of the string, not counting '\0'.

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'.

The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines