MySQL 5.6.14 Source Code Document
|
#include <rpl_gtid.h>
Public Member Functions | |
void | set (rpl_sidno sidno, rpl_gno gno) |
Set the type to GTID_GROUP and SID, GNO to the given values. | |
void | set (const Gtid >id_param) |
Set the type to GTID_GROUP and SID, GNO to the given Gtid. | |
void | set_automatic () |
Set the type to AUTOMATIC_GROUP. | |
void | set_undefined () |
Set to undefined if the current type is GTID_GROUP. | |
void | clear () |
Set the type to GTID_GROUP and SID, GNO to 0, 0. | |
bool | equals (const Gtid_specification &other) const |
Return true if this Gtid_specification is equal to 'other'. | |
bool | equals (const Gtid &other_gtid) const |
enum_return_status | parse (Sid_map *sid_map, const char *text) |
int | to_string (const Sid_map *sid_map, char *buf) const |
int | to_string (const rpl_sid *sid, char *buf) const |
void | print () const |
Debug only: print this Gtid_specification to stdout. | |
void | dbug_print (const char *text="") const |
Static Public Member Functions | |
static enum_group_type | get_type (const char *text) |
static bool | is_valid (const char *text) |
Returns true if the given string is a valid Gtid_specification. |
Public Attributes | |
enum_group_type | type |
The type of this GTID. | |
Gtid | gtid |
Static Public Attributes | |
static const int | MAX_TEXT_LENGTH = Uuid::TEXT_LENGTH + 1 + MAX_GNO_TEXT_LENGTH |
This struct represents a specification of a GTID for a statement to be executed: either "AUTOMATIC", "ANONYMOUS", or "SID:GNO".
This is a POD. It has to be a POD because it is used in THD::variables.
Definition at line 2375 of file rpl_gtid.h.
|
inline |
Print this Gtid_specificatoin to the trace file if debug is enabled; no-op otherwise.
Definition at line 2465 of file rpl_gtid.h.
|
inline |
Return true if this Gtid_specification is a GTID_GROUP with the same SID, GNO as 'other_gtid'.
Definition at line 2413 of file rpl_gtid.h.
|
static |
Returns the type of the group, if the given string is a valid Gtid_specification; INVALID otherwise.
Definition at line 54 of file rpl_gtid_specification.cc.
enum_return_status Gtid_specification::parse | ( | Sid_map * | sid_map, |
const char * | text | ||
) |
Parses the given string and stores in this Gtid_specification.
text | The text to parse |
Definition at line 29 of file rpl_gtid_specification.cc.
int Gtid_specification::to_string | ( | const Sid_map * | sid_map, |
char * | buf | ||
) | const |
Writes this Gtid_specification to the given string buffer.
sid_map | Sid_map to use if the type of this Gtid_specification is GTID_GROUP. |
buf[out] | The buffer |
The | number of characters written. |
Definition at line 95 of file rpl_gtid_specification.cc.
int Gtid_specification::to_string | ( | const rpl_sid * | sid, |
char * | buf | ||
) | const |
Writes this Gtid_specification to the given string buffer.
sid | SID to use if the type of this Gtid_specification is GTID_GROUP. Can be NULL if this Gtid_specification is ANONYMOUS_GROUP or AUTOMATIC_GROUP. |
buf[out] | The buffer |
The | number of characters written. [out] |
Definition at line 69 of file rpl_gtid_specification.cc.
Gtid Gtid_specification::gtid |
The GTID: { SIDNO, GNO } if type == GTID; { 0, 0 } if type == AUTOMATIC or ANONYMOUS.
Definition at line 2384 of file rpl_gtid.h.