mdbx: backport - can't use fakepage mp_ptrs directly (ITS#8819).

This commit is contained in:
Howard Chu 2018-05-04 17:15:43 +03:00 committed by Leo Yuriev
parent df08b5144c
commit 2bccc85ff8

3
mdb.c
View File

@ -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; i<NUMKEYS(fp); i++)
mp->mp_ptrs[i] = fp->mp_ptrs[i] + offset;
mp->mp_ptrs[i] += offset;
}
}