mirror of
https://github.com/isar/libmdbx.git
synced 2025-12-17 17:32:24 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50ba4bc2f2 | ||
|
|
cf6576984d | ||
|
|
4f3e1a60f1 | ||
|
|
04f60af669 | ||
|
|
c6cd642ff1 |
21
ChangeLog.md
21
ChangeLog.md
@@ -1,10 +1,29 @@
|
|||||||
ChangeLog
|
ChangeLog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
## v0.11.11 (Тендра-1790) at 2022-09-11
|
||||||
|
|
||||||
|
The stable bugfix release.
|
||||||
|
It is planned that this will be the last release of the v0.11 branch.
|
||||||
|
|
||||||
|
```
|
||||||
|
10 files changed, 38 insertions(+), 21 deletions(-)
|
||||||
|
Signed-off-by: Леонид Юрьев (Leonid Yuriev) <leo@yuriev.ru>
|
||||||
|
```
|
||||||
|
|
||||||
|
Fixes:
|
||||||
|
|
||||||
|
- Fixed an extra check for `MDBX_APPENDDUP` inside `mdbx_cursor_put()` which could result in returning `MDBX_EKEYMISMATCH` for valid cases.
|
||||||
|
- Fixed an extra ensure/assertion check of `oldest_reader` inside `mdbx_txn_end()`.
|
||||||
|
- Fixed derived C++ builds by removing `MDBX_INTERNAL_FUNC` for `mdbx_w2mb()` and `mdbx_mb2w()`.
|
||||||
|
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
## v0.11.10 (the TriColor) at 2022-08-22
|
## v0.11.10 (the TriColor) at 2022-08-22
|
||||||
|
|
||||||
The stable bugfix release.
|
The stable bugfix release.
|
||||||
It is planned that this will be the last release of the v0.11 branch.
|
|
||||||
|
|
||||||
New:
|
New:
|
||||||
|
|
||||||
|
|||||||
14
src/core.c
14
src/core.c
@@ -8788,10 +8788,6 @@ static int mdbx_txn_end(MDBX_txn *txn, const unsigned mode) {
|
|||||||
(void *)env, txn->mt_dbs[MAIN_DBI].md_root,
|
(void *)env, txn->mt_dbs[MAIN_DBI].md_root,
|
||||||
txn->mt_dbs[FREE_DBI].md_root);
|
txn->mt_dbs[FREE_DBI].md_root);
|
||||||
|
|
||||||
mdbx_ensure(env, txn->mt_txnid >=
|
|
||||||
/* paranoia is appropriate here */ env->me_lck
|
|
||||||
->mti_oldest_reader.weak);
|
|
||||||
|
|
||||||
if (!(mode & MDBX_END_EOTDONE)) /* !(already closed cursors) */
|
if (!(mode & MDBX_END_EOTDONE)) /* !(already closed cursors) */
|
||||||
mdbx_cursors_eot(txn, false);
|
mdbx_cursors_eot(txn, false);
|
||||||
|
|
||||||
@@ -8801,6 +8797,9 @@ static int mdbx_txn_end(MDBX_txn *txn, const unsigned mode) {
|
|||||||
MDBX_reader *slot = txn->to.reader;
|
MDBX_reader *slot = txn->to.reader;
|
||||||
mdbx_assert(env, slot->mr_pid.weak == env->me_pid);
|
mdbx_assert(env, slot->mr_pid.weak == env->me_pid);
|
||||||
if (likely(!F_ISSET(txn->mt_flags, MDBX_TXN_FINISHED))) {
|
if (likely(!F_ISSET(txn->mt_flags, MDBX_TXN_FINISHED))) {
|
||||||
|
mdbx_ensure(env, txn->mt_txnid >=
|
||||||
|
/* paranoia is appropriate here */ env->me_lck
|
||||||
|
->mti_oldest_reader.weak);
|
||||||
mdbx_assert(env, txn->mt_txnid == slot->mr_txnid.weak &&
|
mdbx_assert(env, txn->mt_txnid == slot->mr_txnid.weak &&
|
||||||
slot->mr_txnid.weak >=
|
slot->mr_txnid.weak >=
|
||||||
env->me_lck->mti_oldest_reader.weak);
|
env->me_lck->mti_oldest_reader.weak);
|
||||||
@@ -8828,7 +8827,10 @@ static int mdbx_txn_end(MDBX_txn *txn, const unsigned mode) {
|
|||||||
txn->mt_numdbs = 0; /* prevent further DBI activity */
|
txn->mt_numdbs = 0; /* prevent further DBI activity */
|
||||||
txn->mt_flags = MDBX_TXN_RDONLY | MDBX_TXN_FINISHED;
|
txn->mt_flags = MDBX_TXN_RDONLY | MDBX_TXN_FINISHED;
|
||||||
txn->mt_owner = 0;
|
txn->mt_owner = 0;
|
||||||
} else if (!F_ISSET(txn->mt_flags, MDBX_TXN_FINISHED)) {
|
} else if (!(txn->mt_flags & MDBX_TXN_FINISHED)) {
|
||||||
|
mdbx_ensure(env, txn->mt_txnid >=
|
||||||
|
/* paranoia is appropriate here */ env->me_lck
|
||||||
|
->mti_oldest_reader.weak);
|
||||||
#if defined(MDBX_USE_VALGRIND) || defined(__SANITIZE_ADDRESS__)
|
#if defined(MDBX_USE_VALGRIND) || defined(__SANITIZE_ADDRESS__)
|
||||||
if (txn == env->me_txn0)
|
if (txn == env->me_txn0)
|
||||||
mdbx_txn_valgrind(env, nullptr);
|
mdbx_txn_valgrind(env, nullptr);
|
||||||
@@ -15542,7 +15544,7 @@ int mdbx_cursor_put(MDBX_cursor *mc, const MDBX_val *key, MDBX_val *data,
|
|||||||
mc->mc_ki[mc->mc_top]++; /* step forward for appending */
|
mc->mc_ki[mc->mc_top]++; /* step forward for appending */
|
||||||
rc = MDBX_NOTFOUND;
|
rc = MDBX_NOTFOUND;
|
||||||
} else {
|
} else {
|
||||||
if (unlikely(rc != MDBX_SUCCESS || !(flags & MDBX_APPENDDUP)))
|
if (unlikely(rc != MDBX_SUCCESS))
|
||||||
/* new-key < last-key
|
/* new-key < last-key
|
||||||
* or new-key == last-key without MDBX_APPENDDUP */
|
* or new-key == last-key without MDBX_APPENDDUP */
|
||||||
return MDBX_EKEYMISMATCH;
|
return MDBX_EKEYMISMATCH;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.\" Copyright 2015-2022 Leonid Yuriev <leo@yuriev.ru>.
|
.\" Copyright 2015-2022 Leonid Yuriev <leo@yuriev.ru>.
|
||||||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||||
.TH MDBX_CHK 1 "2022-08-22" "MDBX 0.11.10"
|
.TH MDBX_CHK 1 "2022-09-11" "MDBX 0.11.11"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mdbx_chk \- MDBX checking tool
|
mdbx_chk \- MDBX checking tool
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
||||||
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
||||||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||||
.TH MDBX_COPY 1 "2022-08-22" "MDBX 0.11.10"
|
.TH MDBX_COPY 1 "2022-09-11" "MDBX 0.11.11"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mdbx_copy \- MDBX environment copy tool
|
mdbx_copy \- MDBX environment copy tool
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.\" Copyright 2021-2022 Leonid Yuriev <leo@yuriev.ru>.
|
.\" Copyright 2021-2022 Leonid Yuriev <leo@yuriev.ru>.
|
||||||
.\" Copyright 2014-2021 Howard Chu, Symas Corp. All Rights Reserved.
|
.\" Copyright 2014-2021 Howard Chu, Symas Corp. All Rights Reserved.
|
||||||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||||
.TH MDBX_DROP 1 "2022-08-22" "MDBX 0.11.10"
|
.TH MDBX_DROP 1 "2022-09-11" "MDBX 0.11.11"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mdbx_drop \- MDBX database delete tool
|
mdbx_drop \- MDBX database delete tool
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
||||||
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
||||||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||||
.TH MDBX_DUMP 1 "2022-08-22" "MDBX 0.11.10"
|
.TH MDBX_DUMP 1 "2022-09-11" "MDBX 0.11.11"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mdbx_dump \- MDBX environment export tool
|
mdbx_dump \- MDBX environment export tool
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
||||||
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
||||||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||||
.TH MDBX_LOAD 1 "2022-08-22" "MDBX 0.11.10"
|
.TH MDBX_LOAD 1 "2022-09-11" "MDBX 0.11.11"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mdbx_load \- MDBX environment import tool
|
mdbx_load \- MDBX environment import tool
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved.
|
||||||
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>.
|
||||||
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
|
||||||
.TH MDBX_STAT 1 "2022-08-22" "MDBX 0.11.10"
|
.TH MDBX_STAT 1 "2022-09-11" "MDBX 0.11.11"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mdbx_stat \- MDBX environment status tool
|
mdbx_stat \- MDBX environment status tool
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
|||||||
@@ -527,14 +527,12 @@ static const DWORD WC_ERR_INVALID_CHARS =
|
|||||||
: 0;
|
: 0;
|
||||||
#endif /* WC_ERR_INVALID_CHARS */
|
#endif /* WC_ERR_INVALID_CHARS */
|
||||||
|
|
||||||
MDBX_INTERNAL_FUNC size_t mdbx_mb2w(wchar_t *dst, size_t dst_n, const char *src,
|
size_t mdbx_mb2w(wchar_t *dst, size_t dst_n, const char *src, size_t src_n) {
|
||||||
size_t src_n) {
|
|
||||||
return MultiByteToWideChar(CP_THREAD_ACP, MB_ERR_INVALID_CHARS, src,
|
return MultiByteToWideChar(CP_THREAD_ACP, MB_ERR_INVALID_CHARS, src,
|
||||||
(int)src_n, dst, (int)dst_n);
|
(int)src_n, dst, (int)dst_n);
|
||||||
}
|
}
|
||||||
|
|
||||||
MDBX_INTERNAL_FUNC size_t mdbx_w2mb(char *dst, size_t dst_n, const wchar_t *src,
|
size_t mdbx_w2mb(char *dst, size_t dst_n, const wchar_t *src, size_t src_n) {
|
||||||
size_t src_n) {
|
|
||||||
return WideCharToMultiByte(CP_THREAD_ACP, WC_ERR_INVALID_CHARS, src,
|
return WideCharToMultiByte(CP_THREAD_ACP, WC_ERR_INVALID_CHARS, src,
|
||||||
(int)src_n, dst, (int)dst_n, nullptr, nullptr);
|
(int)src_n, dst, (int)dst_n, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,10 +180,8 @@ static inline void mdbx_free(void *ptr) { HeapFree(GetProcessHeap(), 0, ptr); }
|
|||||||
#define vsnprintf _vsnprintf /* ntdll */
|
#define vsnprintf _vsnprintf /* ntdll */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MDBX_INTERNAL_FUNC size_t mdbx_mb2w(wchar_t *dst, size_t dst_n, const char *src,
|
size_t mdbx_mb2w(wchar_t *dst, size_t dst_n, const char *src, size_t src_n);
|
||||||
size_t src_n);
|
size_t mdbx_w2mb(char *dst, size_t dst_n, const wchar_t *src, size_t src_n);
|
||||||
MDBX_INTERNAL_FUNC size_t mdbx_w2mb(char *dst, size_t dst_n, const wchar_t *src,
|
|
||||||
size_t src_n);
|
|
||||||
|
|
||||||
#else /*----------------------------------------------------------------------*/
|
#else /*----------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user