summaryrefslogtreecommitdiff
path: root/sql/wsrep_xid.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/wsrep_xid.cc')
-rw-r--r--sql/wsrep_xid.cc30
1 files changed, 20 insertions, 10 deletions
diff --git a/sql/wsrep_xid.cc b/sql/wsrep_xid.cc
index 133e9cba825..876f791da69 100644
--- a/sql/wsrep_xid.cc
+++ b/sql/wsrep_xid.cc
@@ -89,16 +89,17 @@ static my_bool set_SE_checkpoint(THD* unused, plugin_ref plugin, void* arg)
return FALSE;
}
-void wsrep_set_SE_checkpoint(XID& xid)
+bool wsrep_set_SE_checkpoint(XID& xid)
{
- plugin_foreach(NULL, set_SE_checkpoint, MYSQL_STORAGE_ENGINE_PLUGIN, &xid);
+ return plugin_foreach(NULL, set_SE_checkpoint, MYSQL_STORAGE_ENGINE_PLUGIN,
+ &xid);
}
-void wsrep_set_SE_checkpoint(const wsrep_uuid_t& uuid, wsrep_seqno_t seqno)
+bool wsrep_set_SE_checkpoint(const wsrep_uuid_t& uuid, wsrep_seqno_t seqno)
{
XID xid;
wsrep_xid_init(&xid, uuid, seqno);
- wsrep_set_SE_checkpoint(xid);
+ return wsrep_set_SE_checkpoint(xid);
}
static my_bool get_SE_checkpoint(THD* unused, plugin_ref plugin, void* arg)
@@ -118,12 +119,13 @@ static my_bool get_SE_checkpoint(THD* unused, plugin_ref plugin, void* arg)
return FALSE;
}
-void wsrep_get_SE_checkpoint(XID& xid)
+bool wsrep_get_SE_checkpoint(XID& xid)
{
- plugin_foreach(NULL, get_SE_checkpoint, MYSQL_STORAGE_ENGINE_PLUGIN, &xid);
+ return plugin_foreach(NULL, get_SE_checkpoint, MYSQL_STORAGE_ENGINE_PLUGIN,
+ &xid);
}
-void wsrep_get_SE_checkpoint(wsrep_uuid_t& uuid, wsrep_seqno_t& seqno)
+bool wsrep_get_SE_checkpoint(wsrep_uuid_t& uuid, wsrep_seqno_t& seqno)
{
uuid= WSREP_UUID_UNDEFINED;
seqno= WSREP_SEQNO_UNDEFINED;
@@ -132,16 +134,24 @@ void wsrep_get_SE_checkpoint(wsrep_uuid_t& uuid, wsrep_seqno_t& seqno)
memset(&xid, 0, sizeof(xid));
xid.formatID= -1;
- wsrep_get_SE_checkpoint(xid);
+ if (wsrep_get_SE_checkpoint(xid))
+ {
+ return true;
+ }
- if (xid.formatID == -1) return; // nil XID
+ if (xid.formatID == -1) // nil XID
+ {
+ return false;
+ }
if (!wsrep_is_wsrep_xid(&xid))
{
WSREP_WARN("Read non-wsrep XID from storage engines.");
- return;
+ return false;
}
uuid= *wsrep_xid_uuid(xid);
seqno= wsrep_xid_seqno(xid);
+
+ return false;
}