23#ifndef MYSQL_GTID_UUID_H
24#define MYSQL_GTID_UUID_H
89 static bool is_valid(
const char *
string,
size_t len);
104 int parse(
const char *
string,
size_t len);
119 const unsigned char *out_binary_string);
136 static bool read_section(
int section_len,
const char **section_str,
137 const unsigned char **out_binary_str);
150 static size_t to_string(
const unsigned char *bytes_arg,
char *
buf);
168 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
169 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
170 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5,
171 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, -1,
172 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
173 -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1,
174 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
175 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
176 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
177 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
178 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
179 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
180 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
181 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
188 return std::hash<std::string>()(
198namespace [[deprecated]] gtids {
Definition: item_cmpfunc.h:1640
static char buf[MAX_BUF]
Definition: conf_to_src.cc:72
Definition: buf0block_hint.cc:29
bool operator==(const Uuid &a, const Uuid &b)
Definition: uuid.h:193
size_t operator()(const Uuid &uuid) const
Definition: uuid.h:187
This is a POD.
Definition: uuid.h:63
void copy_from(const Uuid &data)
Copies the given UUID object to this UUID.
Definition: uuid.h:71
static const size_t TEXT_LENGTH
The number of bytes in the textual representation of a Uuid.
Definition: uuid.h:162
static constexpr int bytes_per_section[NUMBER_OF_SECTIONS]
Definition: uuid.h:166
bool equals(const Uuid &other) const
Returns true if this UUID is equal the given UUID.
Definition: uuid.h:77
void copy_from(const unsigned char *data)
Copies the given 16-byte data to this UUID.
Definition: uuid.h:67
static const int NUMBER_OF_SECTIONS
Definition: uuid.h:165
void print() const
Definition: uuid.h:156
void copy_to(unsigned char *data) const
Copies the given UUID object to this UUID.
Definition: uuid.h:75
unsigned char bytes[BYTE_LENGTH]
The data for this Uuid.
Definition: uuid.h:141
static bool read_section(int section_len, const char **section_str, const unsigned char **out_binary_str)
Helper method used to validate and parse one section of a uuid.
Definition: uuid.cpp:71
static const size_t BYTE_LENGTH
The number of bytes in the data of a Uuid.
Definition: uuid.h:139
static constexpr int hex_to_byte[256]
Definition: uuid.h:167
std::string to_string() const
Definition: uuid.h:151
int parse(const char *string, size_t len)
Stores the UUID represented by a string of the form XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX or XXXXXXXXX...
Definition: uuid.cpp:34
static bool is_valid(const char *string, size_t len)
Returns true if parse() would succeed, but doesn't store the result.
Definition: uuid.cpp:91
void clear()
Set to all zeros.
Definition: uuid.h:65
static const size_t BIT_LENGTH
The number of bits in the data of a Uuid.
Definition: uuid.h:164