From f425e98eb5f0e56b6b5a9cd1314e7eb5016de3dd Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Fri, 6 Jul 2018 15:25:14 +0300 Subject: [PATCH] mdbx: fix mdbx_env_compact(). Change-Id: Ie269b45c3d0325cb1b2d82f4ed1c18f8b3fe4212 --- src/mdbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mdbx.c b/src/mdbx.c index 526c5053..2ba38d26 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -10446,8 +10446,8 @@ static int __cold mdbx_env_compact(MDBX_env *env, mdbx_filehandle_t fd) { /* update signature */ meta->mp_meta.mm_datasync_sign = mdbx_meta_sign(&meta->mp_meta); + memcpy(ctx.mc_wbuf[0], buffer, ctx.mc_wlen[0] = pgno2bytes(env, NUM_METAS)); - ctx.mc_wlen[0] = pgno2bytes(env, NUM_METAS); ctx.mc_txn = txn; rc = mdbx_env_cwalk(&ctx, &root, 0); if (rc == MDBX_SUCCESS && root != new_root) {