mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 16:44:13 +08:00
mdbx: fix ov-pages copying in cursor_put().
I think I just lost one line of code. This bug was added by 09d790431710f6456cb80bcfc5962da5851893ed
This commit is contained in:
parent
3627145129
commit
cbff647579
8
mdb.c
8
mdb.c
@ -6864,13 +6864,8 @@ current:
|
||||
* parent txn, in case the user peeks at MDB_RESERVEd
|
||||
* or unused parts. Some users treat ovpages specially.
|
||||
*/
|
||||
#if MDBX_MODE_ENABLED
|
||||
/* LY: New page will contain only header from origin,
|
||||
* but no any payload */
|
||||
memcpy(np, omp, PAGEHDRSZ);
|
||||
#else
|
||||
size_t sz = (size_t) env->me_psize * ovpages, off;
|
||||
if (!(flags & MDB_RESERVE)) {
|
||||
if (MDBX_MODE_ENABLED || !(flags & MDB_RESERVE)) {
|
||||
/* Skip the part where LMDB will put *data.
|
||||
* Copy end of page, adjusting alignment so
|
||||
* compiler may copy words instead of bytes.
|
||||
@ -6881,7 +6876,6 @@ current:
|
||||
sz = PAGEHDRSZ;
|
||||
}
|
||||
memcpy(np, omp, sz); /* Copy whole or header of page */
|
||||
#endif /* MDBX_MODE_ENABLED */
|
||||
omp = np;
|
||||
}
|
||||
SETDSZ(leaf, data->mv_size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user