mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 02:04:13 +08:00
mdbx: fix page_copy()
for unspilling a large/overflow page.
Change-Id: I46c6b6bf94c877c1c0142116c404692960dc5ab7
This commit is contained in:
parent
9c9cdfdb6d
commit
3622433cf4
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user