Skip to content
Permalink
Browse files

trx_sys_read_wsrep_checkpoint(): Return whether a checkpoint is present

  • Loading branch information...
dr-m committed Jun 29, 2017
1 parent cd62350 commit aea0e125d2cc17f4db5fe2079d8e89100f85714d
Showing with 12 additions and 10 deletions.
  1. +5 −5 storage/innobase/include/trx0sys.h
  2. +7 −5 storage/innobase/trx/trx0sys.cc
@@ -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 */

0 comments on commit aea0e12

Please sign in to comment.
You can’t perform that action at this time.