Commit aea0e125 authored by Marko Mäkelä's avatar Marko Mäkelä

trx_sys_read_wsrep_checkpoint(): Return whether a checkpoint is present

parent cd623508
......@@ -255,11 +255,11 @@ trx_sys_update_wsrep_checkpoint(
trx_sysf_t* sys_header, /*!< in: sys_header */
mtr_t* mtr); /*!< in: mtr */
void
/** Read WSREP checkpoint XID from sys header. */
trx_sys_read_wsrep_checkpoint(
/*==========================*/
XID* xid); /*!< out: WSREP XID */
/** Read WSREP checkpoint XID from sys header.
@param[out] xid WSREP XID
@return whether the checkpoint was present */
bool
trx_sys_read_wsrep_checkpoint(XID* xid);
#endif /* WITH_WSREP */
/** Initializes the tablespace tag system. */
......
......@@ -349,10 +349,11 @@ trx_sys_update_wsrep_checkpoint(
}
void
trx_sys_read_wsrep_checkpoint(
/*==========================*/
XID* xid)
/** Read WSREP checkpoint XID from sys header.
@param[out] xid WSREP XID
@return whether the checkpoint was present */
bool
trx_sys_read_wsrep_checkpoint(XID* xid)
{
trx_sysf_t* sys_header;
mtr_t mtr;
......@@ -372,7 +373,7 @@ trx_sys_read_wsrep_checkpoint(
memcpy(xid->data + 24, &seqno, sizeof(long long));
xid->formatID = -1;
mtr_commit(&mtr);
return;
return false;
}
xid->formatID = (int)mach_read_from_4(
......@@ -389,6 +390,7 @@ trx_sys_read_wsrep_checkpoint(
XIDDATASIZE);
mtr_commit(&mtr);
return true;
}
#endif /* WITH_WSREP */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment