From 06691aeafc0df4b6021170df3a40f6162c07102e Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Mon, 16 Nov 2020 00:50:27 +0300 Subject: [PATCH] mdbx-load: fix/preserve DB geometry without the `mapsize` header item. More for https://github.com/erthink/libmdbx/issues/136. Change-Id: I385869f2894ebe83b00b4e5b7ac4cacaabaf25d9 --- src/mdbx_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mdbx_load.c b/src/mdbx_load.c index fe4c19d3..38ac180c 100644 --- a/src/mdbx_load.c +++ b/src/mdbx_load.c @@ -594,7 +594,7 @@ int main(int argc, char *argv[]) { } } - if (envinfo.mi_mapsize) { + if (envinfo.mi_geo.current | envinfo.mi_mapsize) { if (envinfo.mi_geo.current) { rc = mdbx_env_set_geometry( env, (intptr_t)envinfo.mi_geo.lower, (intptr_t)envinfo.mi_geo.current,