mdbx: preserve (don't upgrade) format-signature during turn to a specified meta-page while recovery.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-03-22 16:51:32 +03:00
parent 9c832c24a6
commit a5c064c33e

View File

@ -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;