MySQL 8.0.39
Source Code Documentation
|
TODO: Move this structure to libbinlogevents/include/control_events.h when we start using C++11. More...
#include <rpl_gtid.h>
Public Member Functions | |
void | clear () |
Set both components to 0. More... | |
void | set (rpl_sidno sidno_arg, rpl_gno gno_arg) |
Set both components to the given, positive values. More... | |
bool | is_empty () const |
Return true if sidno is zero (and assert that gno is zero too in this case). More... | |
int | to_string (const rpl_sid &sid, char *buf) const |
Convert a Gtid to a string. More... | |
int | to_string (const Sid_map *sid_map, char *buf, bool need_lock=false) const |
Convert this Gtid to a string. More... | |
bool | equals (const Gtid &other) const |
Returns true if this Gtid has the same sid and gno as 'other'. More... | |
enum_return_status | parse (Sid_map *sid_map, const char *text) |
Parses the given string and stores in this Gtid. More... | |
void | print (const Sid_map *sid_map) const |
Debug only: print this Gtid to stdout. More... | |
void | dbug_print (const Sid_map *sid_map, const char *text="", bool need_lock=false) const |
Print this Gtid to the trace file if debug is enabled; no-op otherwise. More... | |
Static Public Member Functions | |
static bool | is_valid (const char *text) |
Return true if parse() would succeed, but don't store the result anywhere. More... | |
Public Attributes | |
rpl_sidno | sidno |
SIDNO of this Gtid. More... | |
rpl_gno | gno |
GNO of this Gtid. More... | |
Static Public Attributes | |
static const int | MAX_TEXT_LENGTH |
The maximal length of the textual representation of a SID, not including the terminating '\0'. More... | |
TODO: Move this structure to libbinlogevents/include/control_events.h when we start using C++11.
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.
|
inline |
Set both components to 0.
|
inline |
Print this Gtid to the trace file if debug is enabled; no-op otherwise.
|
inline |
Returns true if this Gtid has the same sid and gno as 'other'.
|
inline |
Return true if sidno is zero (and assert that gno is zero too in this case).
|
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.
sid_map | sid_map to use when converting SID to a sidno. |
text | The text to parse |
|
inline |
Debug only: print this Gtid to stdout.
Set both components to the given, positive values.
int Gtid::to_string | ( | const rpl_sid & | sid, |
char * | buf | ||
) | const |
Convert a Gtid to a string.
sid | the sid to use. This overrides the sidno of this Gtid. | |
[out] | buf | Buffer to store the Gtid in (normally MAX_TEXT_LENGTH+1 bytes long). |
int Gtid::to_string | ( | const Sid_map * | sid_map, |
char * | buf, | ||
bool | need_lock = false |
||
) | const |
Convert this Gtid to a string.
sid_map | sid_map to use when converting sidno to a SID. | |
[out] | buf | Buffer to store the Gtid in (normally MAX_TEXT_LENGTH+1 bytes long). |
need_lock | If true, the function will acquire sid_map->sid_lock; otherwise it will assert that the lock is held. |
rpl_gno Gtid::gno |
GNO of this Gtid.
|
static |
The maximal length of the textual representation of a SID, not including the terminating '\0'.
rpl_sidno Gtid::sidno |
SIDNO of this Gtid.