From 0be592530ed8138552cd18e61c7bdc9ec60fcaaf Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Fri, 31 Aug 2018 01:30:40 +0300 Subject: [PATCH] mdbx: fix accounting mdbx_ovpage_free(). --- src/mdbx.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mdbx.c b/src/mdbx.c index cd4f7e48..289077bc 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -6893,7 +6893,12 @@ static int mdbx_ovpage_free(MDBX_cursor *mc, MDBX_page *mp) { if (unlikely(rc)) return rc; } + mc->mc_db->md_overflow_pages -= ovpages; + if (unlikely(mc->mc_flags & C_SUB)) { + MDBX_db *outer = mdbx_outer_db(mc); + outer->md_overflow_pages -= ovpages; + } return 0; }