mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: не возвращаем ошибку при попытке закрытия MAIN_DBI
.
This commit is contained in:
parent
722c6ecf43
commit
fd98a635d9
@ -22503,6 +22503,12 @@ int mdbx_dbi_close(MDBX_env *env, MDBX_dbi dbi) {
|
||||
if (unlikely(rc != MDBX_SUCCESS))
|
||||
return rc;
|
||||
|
||||
if (unlikely(dbi < CORE_DBS))
|
||||
return (dbi == MAIN_DBI) ? MDBX_SUCCESS : MDBX_BAD_DBI;
|
||||
|
||||
if (unlikely(dbi >= env->me_maxdbs))
|
||||
return MDBX_BAD_DBI;
|
||||
|
||||
if (unlikely(dbi < CORE_DBS || dbi >= env->me_maxdbs))
|
||||
return MDBX_BAD_DBI;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user