From 2bccc85ff82fb70fa7df2fdeb7a763c8333ef1f1 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 4 May 2018 17:15:43 +0300 Subject: [PATCH] mdbx: backport - can't use fakepage mp_ptrs directly (ITS#8819). --- mdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mdb.c b/mdb.c index 082e823e..43f95cb0 100644 --- a/mdb.c +++ b/mdb.c @@ -7081,8 +7081,9 @@ prep_subDB: } else { memcpy((char *)mp + mp->mp_upper + PAGEBASE, (char *)fp + fp->mp_upper + PAGEBASE, olddata.mv_size - fp->mp_upper - PAGEBASE); + memcpy((char *)(&mp->mp_ptrs), (char *)(&fp->mp_ptrs), NUMKEYS(fp) * sizeof(mp->mp_ptrs[0])); for (i=0; imp_ptrs[i] = fp->mp_ptrs[i] + offset; + mp->mp_ptrs[i] += offset; } }