mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 17:14:12 +08:00
mdbx-load: fix DBI-error without -s name
option.
Related to https://github.com/erthink/libmdbx/issues/136 Change-Id: I1e634456867f92dc1488a826eabf65ab28e64c1b
This commit is contained in:
parent
3ed58c281a
commit
74e495569e
@ -771,10 +771,15 @@ int main(int argc, char *argv[]) {
|
||||
error("mdbx_txn_commit", rc);
|
||||
goto env_close;
|
||||
}
|
||||
rc = mdbx_dbi_close(env, dbi);
|
||||
if (unlikely(rc != MDBX_SUCCESS)) {
|
||||
error("mdbx_dbi_close", rc);
|
||||
goto env_close;
|
||||
if (subname) {
|
||||
assert(dbi != MAIN_DBI);
|
||||
rc = mdbx_dbi_close(env, dbi);
|
||||
if (unlikely(rc != MDBX_SUCCESS)) {
|
||||
error("mdbx_dbi_close", rc);
|
||||
goto env_close;
|
||||
}
|
||||
} else {
|
||||
assert(dbi == MAIN_DBI);
|
||||
}
|
||||
|
||||
/* try read next header */
|
||||
|
Loading…
x
Reference in New Issue
Block a user