mdbx: fix page_copy() for unspilling a large/overflow page.

Change-Id: I46c6b6bf94c877c1c0142116c404692960dc5ab7
This commit is contained in:
Leonid Yuriev 2021-04-17 19:02:48 +03:00
parent 9c9cdfdb6d
commit 3622433cf4

View File

@ -6354,7 +6354,7 @@ done:
__hot static void mdbx_page_copy(MDBX_page *dst, MDBX_page *src, size_t psize) {
STATIC_ASSERT(UINT16_MAX > MAX_PAGESIZE - PAGEHDRSZ);
STATIC_ASSERT(MIN_PAGESIZE > PAGEHDRSZ + NODESIZE * 4);
if (!IS_LEAF2(src)) {
if ((src->mp_flags & (P_LEAF2 | P_OVERFLOW)) == 0) {
size_t upper = src->mp_upper, lower = src->mp_lower, unused = upper - lower;
/* If page isn't full, just copy the used portion. Adjust