mdbx: fix mdbx_env_compact().

Change-Id: Ie269b45c3d0325cb1b2d82f4ed1c18f8b3fe4212
This commit is contained in:
Leo Yuriev 2018-07-06 15:25:14 +03:00
parent 20a61f273c
commit f425e98eb5

View File

@ -10446,8 +10446,8 @@ static int __cold mdbx_env_compact(MDBX_env *env, mdbx_filehandle_t fd) {
/* update signature */ /* update signature */
meta->mp_meta.mm_datasync_sign = mdbx_meta_sign(&meta->mp_meta); 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; ctx.mc_txn = txn;
rc = mdbx_env_cwalk(&ctx, &root, 0); rc = mdbx_env_cwalk(&ctx, &root, 0);
if (rc == MDBX_SUCCESS && root != new_root) { if (rc == MDBX_SUCCESS && root != new_root) {