mdbx: removes wrong condition from the assertion.

Fixes https://github.com/erthink/libmdbx/issues/105

I decided to remove the extra check, since a sub-cursor cannot return data
and there is no point in adding assignments just for this check.

Change-Id: I6a983930abb37b8f6ab768602763495572adf7fd
This commit is contained in:
Leonid Yuriev 2020-05-22 22:09:02 +03:00
parent 78e592579a
commit d1d65f8090

View File

@ -12081,7 +12081,7 @@ int mdbx_cursor_put(MDBX_cursor *mc, const MDBX_val *key, MDBX_val *data,
if (likely(rc == MDBX_SUCCESS)) {
if (exact) {
if (mc->mc_flags & C_SUB) {
mdbx_assert(env, data->iov_len == 0 && olddata.iov_len == 0);
mdbx_assert(env, data->iov_len == 0);
return (flags & MDBX_NODUPDATA) ? MDBX_KEYEXIST : MDBX_SUCCESS;
}
if (!(flags & MDBX_RESERVE) &&