Skip to content

Commit 56663da

Browse files
committed
libmdbx: pull from https://github.com/leo-yuriev/libmdbx (MDBX_KEYEXIST for MDBX_APPEND+MDBX_NOOVERWRITE).
This resolves #141 Merge commit '02fc5fe1585599a0df45608d53c15c440685ce89' into devel
2 parents 5491c17 + 02fc5fe commit 56663da

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

libraries/libmdbx/src/mdbx.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -7195,7 +7195,8 @@ int mdbx_cursor_put(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
71957195
} else {
71967196
rc = mdbx_cursor_set(mc, key, &d2, MDBX_SET, &exact);
71977197
}
7198-
if ((flags & MDBX_NOOVERWRITE) && rc == 0) {
7198+
if ((flags & MDBX_NOOVERWRITE) &&
7199+
(rc == MDBX_SUCCESS || rc == MDBX_EKEYMISMATCH)) {
71997200
mdbx_debug("duplicate key [%s]", DKEY(key));
72007201
*data = d2;
72017202
return MDBX_KEYEXIST;

libraries/libmdbx/src/version.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#error "API version mismatch!"
1919
#endif
2020

21-
#define MDBX_VERSION_RELEASE 0
22-
#define MDBX_VERSION_REVISION 0
21+
#define MDBX_VERSION_RELEASE 2
22+
#define MDBX_VERSION_REVISION 1
2323

2424
/*LIBMDBX_EXPORTS*/ const mdbx_version_info mdbx_version = {
2525
MDBX_VERSION_MAJOR,

0 commit comments

Comments
 (0)