mirror of
https://github.com/isar/libmdbx.git
synced 2025-02-02 05:48:20 +08:00
mdbx: refine meta_txnid().
Change-Id: I4d78b2ebed8850c90dc762405ba939be7385c9a3
This commit is contained in:
parent
ae71c2aa36
commit
c01aeb5c68
@ -134,7 +134,7 @@ typedef uint64_t txnid_t;
|
|||||||
#elif MDBX_DEBUG
|
#elif MDBX_DEBUG
|
||||||
#define MIN_TXNID UINT64_C(0x100000000)
|
#define MIN_TXNID UINT64_C(0x100000000)
|
||||||
#else
|
#else
|
||||||
#define MIN_TXNID UINT64_C(0)
|
#define MIN_TXNID UINT64_C(1)
|
||||||
#endif /* MIN_TXNID */
|
#endif /* MIN_TXNID */
|
||||||
|
|
||||||
/* Used for offsets within a single page.
|
/* Used for offsets within a single page.
|
||||||
|
@ -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 a = meta->mm_txnid_a;
|
||||||
txnid_t b = meta->mm_txnid_b;
|
txnid_t b = meta->mm_txnid_b;
|
||||||
if (allow_volatile)
|
if (allow_volatile)
|
||||||
return (a < b) ? a : b;
|
return (a == b) ? a : 0;
|
||||||
mdbx_assert(env, a == b);
|
mdbx_assert(env, a == b);
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user