mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:34:13 +08:00
mdbx: preserve error from env_set_geometry() inside setup_dxb().
Change-Id: I8dae0b38eb09cfaa07cdd80cb37dc414e2f99d7a
This commit is contained in:
parent
0aef609dad
commit
03cc19babb
10
src/core.c
10
src/core.c
@ -9310,8 +9310,9 @@ static int __cold mdbx_setup_dxb(MDBX_env *env, const int lck_rc) {
|
||||
meta.mm_geo.upper * pagesize, meta.mm_geo.grow * pagesize,
|
||||
meta.mm_geo.shrink * pagesize, meta.mm_psize);
|
||||
if (unlikely(err != MDBX_SUCCESS)) {
|
||||
mdbx_error("%s", "could not use present dbsize-params from db");
|
||||
return MDBX_INCOMPATIBLE;
|
||||
mdbx_error("%s: err %d", "could not apply preconfigured db-geometry",
|
||||
err);
|
||||
return (err == MDBX_EINVAL) ? MDBX_INCOMPATIBLE : err;
|
||||
}
|
||||
} else if (env->me_dbgeo.now) {
|
||||
/* silently growth to last used page */
|
||||
@ -9342,8 +9343,9 @@ static int __cold mdbx_setup_dxb(MDBX_env *env, const int lck_rc) {
|
||||
env->me_dbgeo.upper, env->me_dbgeo.grow,
|
||||
env->me_dbgeo.shrink, meta.mm_psize);
|
||||
if (unlikely(err != MDBX_SUCCESS)) {
|
||||
mdbx_error("%s", "could not apply preconfigured dbsize-params to db");
|
||||
return MDBX_INCOMPATIBLE;
|
||||
mdbx_error("%s: err %d", "could not apply preconfigured db-geometry",
|
||||
err);
|
||||
return (err == MDBX_EINVAL) ? MDBX_INCOMPATIBLE : err;
|
||||
}
|
||||
|
||||
/* update meta fields */
|
||||
|
Loading…
x
Reference in New Issue
Block a user