From d1d65f80908c7d07f894aad1b73822bfe8ce02ac Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Fri, 22 May 2020 22:09:02 +0300 Subject: [PATCH] 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 --- src/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index 5ab9606b..87a4b7e0 100644 --- a/src/core.c +++ b/src/core.c @@ -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) &&