diff --git a/appveyor.yml b/appveyor.yml index 61675c08..9bf3ea04 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 0.10.5.{build} +version: 0.11.0.{build} environment: matrix: diff --git a/mdbx.h b/mdbx.h index 34bb1dfc..2a9f56fa 100644 --- a/mdbx.h +++ b/mdbx.h @@ -568,9 +568,9 @@ typedef mode_t mdbx_mode_t; extern "C" { #endif -/* MDBX version 0.10.x */ +/* MDBX version 0.11.x */ #define MDBX_VERSION_MAJOR 0 -#define MDBX_VERSION_MINOR 10 +#define MDBX_VERSION_MINOR 11 #ifndef LIBMDBX_API #if defined(LIBMDBX_EXPORTS) diff --git a/src/core.c b/src/core.c index f61137ab..80a2a963 100644 --- a/src/core.c +++ b/src/core.c @@ -10124,7 +10124,8 @@ static int mdbx_validate_meta(MDBX_env *env, MDBX_meta *const meta, const uint64_t magic_and_version = unaligned_peek_u64(4, &meta->mm_magic_and_version); if (unlikely(magic_and_version != MDBX_DATA_MAGIC && - magic_and_version != MDBX_DATA_MAGIC_DEVEL)) { + magic_and_version != MDBX_DATA_MAGIC_LEGACY_COMPAT && + magic_and_version != MDBX_DATA_MAGIC_LEGACY_DEVEL)) { mdbx_error("meta[%u] has invalid magic/version %" PRIx64, meta_number, magic_and_version); return ((magic_and_version >> 8) != MDBX_MAGIC) ? MDBX_INVALID diff --git a/src/internals.h b/src/internals.h index 4c7738ee..a3ba11b1 100644 --- a/src/internals.h +++ b/src/internals.h @@ -384,7 +384,7 @@ MDBX_MAYBE_UNUSED static #define MDBX_MAGIC UINT64_C(/* 56-bit prime */ 0x59659DBDEF4C11) /* FROZEN: The version number for a database's datafile format. */ -#define MDBX_DATA_VERSION 2 +#define MDBX_DATA_VERSION 3 /* The version number for a database's lockfile format. */ #define MDBX_LOCK_VERSION 4 @@ -789,7 +789,11 @@ typedef struct MDBX_lockinfo { #define MDBX_DATA_MAGIC \ ((MDBX_MAGIC << 8) + MDBX_PNL_ASCENDING * 64 + MDBX_DATA_VERSION) -#define MDBX_DATA_MAGIC_DEVEL ((MDBX_MAGIC << 8) + 255) + +#define MDBX_DATA_MAGIC_LEGACY_COMPAT \ + ((MDBX_MAGIC << 8) + MDBX_PNL_ASCENDING * 64 + 2) + +#define MDBX_DATA_MAGIC_LEGACY_DEVEL ((MDBX_MAGIC << 8) + 255) #define MDBX_LOCK_MAGIC ((MDBX_MAGIC << 8) + MDBX_LOCK_VERSION)