mdbx: fix accounting mdbx_cursor_del().

Change-Id: I19418e46ac1c692aa4eb346019c3a11539870f94
This commit is contained in:
Leonid Yuriev 2018-08-29 03:17:36 +03:00 committed by Leo Yuriev
parent f62bb4b6a7
commit 676fc941f1

View File

@ -8337,6 +8337,9 @@ int mdbx_cursor_del(MDBX_cursor *mc, unsigned flags) {
if (leaf->mn_flags & F_SUBDATA) { if (leaf->mn_flags & F_SUBDATA) {
/* add all the child DB's pages to the free list */ /* add all the child DB's pages to the free list */
mc->mc_db->md_branch_pages -= mc->mc_xcursor->mx_db.md_branch_pages;
mc->mc_db->md_leaf_pages -= mc->mc_xcursor->mx_db.md_leaf_pages;
mc->mc_db->md_overflow_pages -= mc->mc_xcursor->mx_db.md_overflow_pages;
rc = mdbx_drop0(&mc->mc_xcursor->mx_cursor, 0); rc = mdbx_drop0(&mc->mc_xcursor->mx_cursor, 0);
if (unlikely(rc)) if (unlikely(rc))
goto fail; goto fail;