From a5c064c33eda622950cc4895b304a3f3c4ac4e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Tue, 22 Mar 2022 16:51:32 +0300 Subject: [PATCH] mdbx: preserve (don't upgrade) format-signature during turn to a specified meta-page while recovery. --- src/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core.c b/src/core.c index 5a4af632..3fb5d0fb 100644 --- a/src/core.c +++ b/src/core.c @@ -12618,6 +12618,9 @@ __cold static int __must_check_result mdbx_override_meta( mdbx_assert(env, meta_checktxnid(env, model, true)); if (shape) { mdbx_assert(env, meta_checktxnid(env, shape, true)); + if (env->me_stuck_meta >= 0) + memcpy(&model->mm_magic_and_version, &shape->mm_magic_and_version, + sizeof(model->mm_magic_and_version)); model->mm_extra_flags = shape->mm_extra_flags; model->mm_validator_id = shape->mm_validator_id; model->mm_extra_pagehdr = shape->mm_extra_pagehdr;