mdbx: drop MDBX_DEVEL.

Change-Id: I5fc1a240e7909b8ecaf2ef19a83a9e59ea5609ba
This commit is contained in:
Leo Yuriev 2018-06-13 11:37:56 +03:00
parent efdcbd8c35
commit 2f983b281d
2 changed files with 5 additions and 12 deletions

View File

@ -23,11 +23,6 @@
# undef NDEBUG # undef NDEBUG
#endif #endif
/* Features under development */
#ifndef MDBX_DEVEL
# define MDBX_DEVEL 0
#endif
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* Should be defined before any includes */ /* Should be defined before any includes */
@ -144,9 +139,9 @@
#define MDBX_MAGIC UINT64_C(/* 56-bit prime */ 0x59659DBDEF4C11) #define MDBX_MAGIC UINT64_C(/* 56-bit prime */ 0x59659DBDEF4C11)
/* The version number for a database's datafile format. */ /* 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. */ /* 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. */ /* handle for the DB used to track free pages. */
#define FREE_DBI 0 #define FREE_DBI 0
@ -171,9 +166,7 @@ typedef uint32_t pgno_t;
/* A transaction ID. */ /* A transaction ID. */
typedef uint64_t txnid_t; typedef uint64_t txnid_t;
#define PRIaTXN PRIi64 #define PRIaTXN PRIi64
#if MDBX_DEVEL #if MDBX_DEBUG
#define MIN_TXNID (UINT64_MAX - UINT32_MAX)
#elif MDBX_DEBUG
#define MIN_TXNID UINT64_C(0x100000000) #define MIN_TXNID UINT64_C(0x100000000)
#else #else
#define MIN_TXNID UINT64_C(1) #define MIN_TXNID UINT64_C(1)

View File

@ -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) { if (page.mp_meta.mm_magic_and_version != MDBX_DATA_MAGIC) {
mdbx_error("meta[%u] has invalid magic/version MDBX_DEVEL=%d", mdbx_error("meta[%u] has invalid magic/version %" PRIx64, meta_number,
meta_number, MDBX_DEVEL); page.mp_meta.mm_magic_and_version);
return ((page.mp_meta.mm_magic_and_version >> 8) != MDBX_MAGIC) return ((page.mp_meta.mm_magic_and_version >> 8) != MDBX_MAGIC)
? MDBX_INVALID ? MDBX_INVALID
: MDBX_VERSION_MISMATCH; : MDBX_VERSION_MISMATCH;