From fe386a66dfd1a48480638122c317c99bb0dbe2d9 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Fri, 18 Dec 2020 14:59:11 +0300 Subject: [PATCH] mdbx: minor refine `mdbx_page_unspill()`. Change-Id: I20bbd4c502a2258b945996fa1cf761eab7f88a80 --- src/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index e8637060..540c8ad0 100644 --- a/src/core.c +++ b/src/core.c @@ -5662,9 +5662,10 @@ static int __must_check_result mdbx_page_unspill(MDBX_txn *txn, MDBX_page *mp, /* If in current txn, this page is no longer spilled. * If it happens to be the last page, truncate the spill list. * Otherwise mark it as deleted by setting the LSB. */ - txn->tw.spill_pages[i] |= 1; if (i == MDBX_PNL_SIZE(txn->tw.spill_pages)) MDBX_PNL_SIZE(txn->tw.spill_pages) -= 1; + else + txn->tw.spill_pages[i] |= 1; } /* otherwise, if belonging to a parent txn, the * page remains spilled until child commits */