mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:44:13 +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)) {
|
||||
MDBX_page *omp;
|
||||
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));
|
||||
if (unlikely((rc2 = mdbx_page_get(mc, pg, &omp, &level)) != 0))
|
||||
|
Loading…
x
Reference in New Issue
Block a user