My Project
|
#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_anonymous () |
Set the type to ANONYMOUS_GROUP and SID, GNO to 0, 0. | |
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.
void Gtid_specification::dbug_print | ( | const char * | text = "" | ) | const [inline] |
Print this Gtid_specificatoin to the trace file if debug is enabled; no-op otherwise.
bool Gtid_specification::equals | ( | const Gtid & | other_gtid | ) | const [inline] |
Return true if this Gtid_specification is a GTID_GROUP with the same SID, GNO as 'other_gtid'.
enum_group_type Gtid_specification::get_type | ( | const char * | text | ) | [static] |
Returns the type of the group, if the given string is a valid Gtid_specification; INVALID otherwise.
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 |
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. |
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] |
The GTID: { SIDNO, GNO } if type == GTID; { 0, 0 } if type == AUTOMATIC or ANONYMOUS.