mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-31 10:58:20 +08:00
mdbx: fix mdbx_setup_dxb() for a case when db-size not (pre)configured by user.
Fix https://github.com/leo-yuriev/libmdbx/issues/11 Change-Id: I6fccd4877fed563cfb3a03f887bbba73eff5ac84
This commit is contained in:
parent
be5bbea281
commit
9b5e28e8e6
@ -4757,6 +4757,13 @@ static int __cold mdbx_setup_dxb(MDBX_env *env, int lck_rc) {
|
|||||||
meta.mm_txnid_a, mdbx_durable_str(&meta));
|
meta.mm_txnid_a, mdbx_durable_str(&meta));
|
||||||
}
|
}
|
||||||
mdbx_ensure(env, meta.mm_geo.now >= meta.mm_geo.next);
|
mdbx_ensure(env, meta.mm_geo.now >= meta.mm_geo.next);
|
||||||
|
} else {
|
||||||
|
/* geo-params not pre-configured by used, fetch present from meta. */
|
||||||
|
env->me_dbgeo.now = pgno2bytes(env, meta.mm_geo.now);
|
||||||
|
env->me_dbgeo.lower = pgno2bytes(env, meta.mm_geo.lower);
|
||||||
|
env->me_dbgeo.upper = pgno2bytes(env, meta.mm_geo.upper);
|
||||||
|
env->me_dbgeo.grow = pgno2bytes(env, meta.mm_geo.grow);
|
||||||
|
env->me_dbgeo.shrink = pgno2bytes(env, meta.mm_geo.shrink);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t filesize_before_mmap;
|
uint64_t filesize_before_mmap;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user