mdbx: fix extra conversion of an error during nested dupsort-DB update to MDBX_PROBLEM.

Hope this fixes https://github.com/erthink/libmdbx/issues/195
This commit is contained in:
Leonid Yuriev 2021-05-10 15:29:48 +03:00
parent 74ea79ac1b
commit 244fab6c04

View File

@ -15066,10 +15066,11 @@ new_sub:;
rc = mdbx_cursor_check(mc, 0);
return rc;
bad_sub:
if (unlikely(rc == MDBX_KEYEXIST))
if (unlikely(rc == MDBX_KEYEXIST)) {
mdbx_error("unexpected %s", "MDBX_KEYEXIST");
/* should not happen, we deleted that item */
rc = MDBX_PROBLEM;
/* should not happen, we deleted that item */
rc = MDBX_PROBLEM;
}
}
mc->mc_txn->mt_flags |= MDBX_TXN_ERROR;
return rc;