From 912728a322192f11bccb2db96da0d963b932e766 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sun, 16 Sep 2018 17:53:35 +0300 Subject: [PATCH] mdbx: backport - fix mdbx_replace(). Change-Id: I2af00f101017795ca2b967479f86e5ea7e8ad37b --- src/mdbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mdbx.c b/src/mdbx.c index e279b447..8b7f4b82 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -11996,7 +11996,7 @@ int mdbx_replace(MDBX_txn *txn, MDBX_dbi dbi, MDBX_val *key, MDBX_val *new_data, rc = mdbx_cursor_get(&mc, &present_key, &present_data, MDBX_SET_KEY); if (unlikely(rc != MDBX_SUCCESS)) { old_data->iov_base = NULL; - old_data->iov_len = rc; + old_data->iov_len = 0; if (rc != MDBX_NOTFOUND || (flags & MDBX_CURRENT)) goto bailout; } else if (flags & MDBX_NOOVERWRITE) {