mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 01:34:14 +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…
x
Reference in New Issue
Block a user