22 #include "mysqld_error.h"
24 #include "sql_class.h"
25 #endif // ifndef MYSQL_CLIENT
29 DBUG_ENTER(
"Gtid::parse");
36 if (sid.
parse(s) == RETURN_STATUS_OK)
38 rpl_sidno sidno_var= sid_map->
add_sid(sid);
40 RETURN_REPORTED_ERROR;
53 rpl_gno gno_var= parse_gno(&s);
64 DBUG_PRINT(
"info", (
"expected end of string, found garbage '%.80s' "
66 s, (
int)(s - text), text));
69 DBUG_PRINT(
"info", (
"GNO was zero or invalid (%lld) at char %d in '%s'",
70 gno_var, (
int)(s - text), text));
73 DBUG_PRINT(
"info", (
"missing colon at char %d in '%s'",
74 (
int)(s - text), text));
77 DBUG_PRINT(
"info", (
"not a uuid at char %d in '%s'",
78 (
int)(s - text), text));
79 BINLOG_ERROR((
"Malformed GTID specification: %.200s", text),
80 (ER_MALFORMED_GTID_SPECIFICATION, MYF(0), text));
81 RETURN_REPORTED_ERROR;
87 DBUG_ENTER(
"Gtid::to_string");
91 s+= format_gno(s,
gno);
92 DBUG_RETURN((
int)(s - buf));
98 DBUG_ENTER(
"Gtid::to_string");
106 DBUG_ENTER(
"Gtid::is_valid");
111 DBUG_PRINT(
"info", (
"not a uuid at char %d in '%s'",
112 (
int)(s - text), text));
119 DBUG_PRINT(
"info", (
"missing colon at char %d in '%s'",
120 (
int)(s - text), text));
125 if (parse_gno(&s) <= 0)
127 DBUG_PRINT(
"info", (
"GNO was zero or invalid at char %d in '%s'",
128 (
int)(s - text), text));
134 DBUG_PRINT(
"info", (
"expected end of string, found garbage '%.80s' "
135 "at char %d in '%s'",
136 s, (
int)(s - text), text));
144 void check_return_status(enum_return_status status,
const char *action,
145 const char *status_name,
int allow_unreported)
147 if (status != RETURN_STATUS_OK)
149 DBUG_ASSERT(allow_unreported || status == RETURN_STATUS_REPORTED_ERROR);
150 if (status == RETURN_STATUS_REPORTED_ERROR)
152 #if !defined(MYSQL_CLIENT) && !defined(DBUG_OFF)
153 THD *thd= current_thd;
154 DBUG_ASSERT(thd == NULL ||
158 DBUG_PRINT(
"info", (
"%s error %d (%s)", action, status, status_name));