mdbx: rework checking MAX_PAGENO and DB upper-size limit.

Related to https://github.com/erthink/libmdbx/issues/260.
This commit is contained in:
Leonid Yuriev
2022-01-21 02:14:36 +03:00
parent 50b843ecb7
commit cd2c5f594c
4 changed files with 70 additions and 52 deletions

View File

@@ -136,6 +136,7 @@ void actor_params::set_defaults(const std::string &tmpdir) {
size_lower = -1;
size_now =
intptr_t(1024) * 1024 * ((table_flags & MDBX_DUPSORT) ? 256 : 1024);
size_now = std::max(size_now, mdbx_limits_dbsize_max(-1));
size_upper = -1;
shrink_threshold = -1;
growth_step = -1;