mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-22 07:58:21 +08:00
mdbx: avoid empty and unneeded large/overflow pages.
Change-Id: I388a60180b999889fc15a1f3f3243c007a15edc6
This commit is contained in:
parent
e08409d209
commit
bf22699fb3
@ -8229,7 +8229,10 @@ int mdbx_cursor_put(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
|
|||||||
if (F_ISSET(leaf->mn_flags, F_BIGDATA)) {
|
if (F_ISSET(leaf->mn_flags, F_BIGDATA)) {
|
||||||
MDBX_page *omp;
|
MDBX_page *omp;
|
||||||
pgno_t pg;
|
pgno_t pg;
|
||||||
int level, ovpages, dpages = OVPAGES(env, data->iov_len);
|
int level, ovpages,
|
||||||
|
dpages = (LEAFSIZE(key, data) > env->me_nodemax)
|
||||||
|
? OVPAGES(env, data->iov_len)
|
||||||
|
: 0;
|
||||||
|
|
||||||
memcpy(&pg, olddata.iov_base, sizeof(pg));
|
memcpy(&pg, olddata.iov_base, sizeof(pg));
|
||||||
if (unlikely((rc2 = mdbx_page_get(mc, pg, &omp, &level)) != 0))
|
if (unlikely((rc2 = mdbx_page_get(mc, pg, &omp, &level)) != 0))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user