From aa5403ad3855a9ca1729bae688887c5f3fa7171e Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Mon, 24 Jul 2017 21:24:45 +0300 Subject: [PATCH] mdbx: 1/1 as default grow/shrink for MDBX_DEBUG. Change-Id: I90fa2705113f134984f9ec341ef37131e598d121 --- src/mdbx.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mdbx.c b/src/mdbx.c index 25b2656b..3445d67f 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -4371,6 +4371,13 @@ LIBMDBX_API int mdbx_env_set_geometry(MDBX_env *env, intptr_t size_lower, const bool outside_txn = (!env->me_txn0 || env->me_txn0->mt_owner != mdbx_thread_self()); +#if MDBX_DEBUG + if (growth_step < 0) + growth_step = 1; + if (shrink_threshold < 0) + shrink_threshold = 1; +#endif + int rc = MDBX_PROBLEM; if (env->me_map) { /* env already mapped */