Skip to content

Commit

Permalink
mdbx: backport - can't use fakepage mp_ptrs directly (ITS#8819).
Browse files Browse the repository at this point in the history
  • Loading branch information
hyc authored and erthink committed May 4, 2018
1 parent df08b51 commit 2bccc85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -7081,8 +7081,9 @@ mdb_cursor_put(MDB_cursor *mc, MDB_val *key, MDB_val *data,
} 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;
}
}

Expand Down

0 comments on commit 2bccc85

Please sign in to comment.