mdbx: add mdbx_env_get_maxdbs().

Change-Id: Ie4bdd2f8a46130f277ef98861a5fca98f55bad54
This commit is contained in:
Leonid Yuriev
2020-07-27 16:26:19 +03:00
parent 9e90718bd5
commit b91918b027
2 changed files with 25 additions and 0 deletions

View File

@@ -9259,6 +9259,18 @@ int __cold mdbx_env_set_maxdbs(MDBX_env *env, MDBX_dbi dbs) {
return MDBX_SUCCESS;
}
int __cold mdbx_env_get_maxdbs(MDBX_env *env, MDBX_dbi *dbs) {
int rc = check_env(env);
if (unlikely(rc != MDBX_SUCCESS))
return rc;
if (unlikely(!dbs))
return MDBX_EINVAL;
*dbs = env->me_maxdbs;
return MDBX_SUCCESS;
}
int __cold mdbx_env_set_maxreaders(MDBX_env *env, unsigned readers) {
int rc = check_env(env);
if (unlikely(rc != MDBX_SUCCESS))