diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-06-29 23:01:47 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-06-29 23:01:47 +0300 |
commit | aea0e125d2cc17f4db5fe2079d8e89100f85714d (patch) | |
tree | 6265c4ee3571d48945f7f9cacf2901070830947c | |
parent | cd623508dff53c210154392da6c0f65b7b6bcf4c (diff) | |
download | mariadb-git-aea0e125d2cc17f4db5fe2079d8e89100f85714d.tar.gz |
trx_sys_read_wsrep_checkpoint(): Return whether a checkpoint is present
-rw-r--r-- | storage/innobase/include/trx0sys.h | 10 | ||||
-rw-r--r-- | storage/innobase/trx/trx0sys.cc | 12 |
2 files changed, 12 insertions, 10 deletions
diff --git a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sys.h index bf8cf2481eb..48eca018a86 100644 --- a/storage/innobase/include/trx0sys.h +++ b/storage/innobase/include/trx0sys.h @@ -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. */ diff --git a/storage/innobase/trx/trx0sys.cc b/storage/innobase/trx/trx0sys.cc index 8d7c72319ed..ec144db5feb 100644 --- a/storage/innobase/trx/trx0sys.cc +++ b/storage/innobase/trx/trx0sys.cc @@ -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 */ |