mdbx-load: fix/preserve DB geometry without the mapsize header item.

More for https://github.com/erthink/libmdbx/issues/136.

Change-Id: I385869f2894ebe83b00b4e5b7ac4cacaabaf25d9
This commit is contained in:
Leonid Yuriev 2020-11-16 00:50:27 +03:00
parent d3b5d0ca83
commit 06691aeafc

View File

@ -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,