mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 19:04:13 +08:00
mdbx: drop MDBX_DEVEL.
Change-Id: I5fc1a240e7909b8ecaf2ef19a83a9e59ea5609ba
This commit is contained in:
parent
efdcbd8c35
commit
2f983b281d
13
src/bits.h
13
src/bits.h
@ -23,11 +23,6 @@
|
||||
# undef NDEBUG
|
||||
#endif
|
||||
|
||||
/* Features under development */
|
||||
#ifndef MDBX_DEVEL
|
||||
# define MDBX_DEVEL 0
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
/* Should be defined before any includes */
|
||||
@ -144,9 +139,9 @@
|
||||
#define MDBX_MAGIC UINT64_C(/* 56-bit prime */ 0x59659DBDEF4C11)
|
||||
|
||||
/* The version number for a database's datafile format. */
|
||||
#define MDBX_DATA_VERSION ((MDBX_DEVEL) ? 255 : 2)
|
||||
#define MDBX_DATA_VERSION 2
|
||||
/* The version number for a database's lockfile format. */
|
||||
#define MDBX_LOCK_VERSION ((MDBX_DEVEL) ? 255 : 2)
|
||||
#define MDBX_LOCK_VERSION 2
|
||||
|
||||
/* handle for the DB used to track free pages. */
|
||||
#define FREE_DBI 0
|
||||
@ -171,9 +166,7 @@ typedef uint32_t pgno_t;
|
||||
/* A transaction ID. */
|
||||
typedef uint64_t txnid_t;
|
||||
#define PRIaTXN PRIi64
|
||||
#if MDBX_DEVEL
|
||||
#define MIN_TXNID (UINT64_MAX - UINT32_MAX)
|
||||
#elif MDBX_DEBUG
|
||||
#if MDBX_DEBUG
|
||||
#define MIN_TXNID UINT64_C(0x100000000)
|
||||
#else
|
||||
#define MIN_TXNID UINT64_C(1)
|
||||
|
@ -4342,8 +4342,8 @@ static int __cold mdbx_read_header(MDBX_env *env, MDBX_meta *meta,
|
||||
}
|
||||
|
||||
if (page.mp_meta.mm_magic_and_version != MDBX_DATA_MAGIC) {
|
||||
mdbx_error("meta[%u] has invalid magic/version MDBX_DEVEL=%d",
|
||||
meta_number, MDBX_DEVEL);
|
||||
mdbx_error("meta[%u] has invalid magic/version %" PRIx64, meta_number,
|
||||
page.mp_meta.mm_magic_and_version);
|
||||
return ((page.mp_meta.mm_magic_and_version >> 8) != MDBX_MAGIC)
|
||||
? MDBX_INVALID
|
||||
: MDBX_VERSION_MISMATCH;
|
||||
|
Loading…
x
Reference in New Issue
Block a user