mdbx: refine meta_txnid().

Change-Id: I4d78b2ebed8850c90dc762405ba939be7385c9a3
This commit is contained in:
Leo Yuriev 2017-06-15 05:02:14 +03:00
parent ae71c2aa36
commit c01aeb5c68
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ typedef uint64_t txnid_t;
#elif MDBX_DEBUG
#define MIN_TXNID UINT64_C(0x100000000)
#else
#define MIN_TXNID UINT64_C(0)
#define MIN_TXNID UINT64_C(1)
#endif /* MIN_TXNID */
/* Used for offsets within a single page.

View File

@ -1335,7 +1335,7 @@ static __inline txnid_t meta_txnid(const MDBX_env *env, const MDBX_meta *meta,
txnid_t a = meta->mm_txnid_a;
txnid_t b = meta->mm_txnid_b;
if (allow_volatile)
return (a < b) ? a : b;
return (a == b) ? a : 0;
mdbx_assert(env, a == b);
return a;
}