mirror of
https://github.com/isar/libmdbx.git
synced 2025-12-15 16:42:22 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
113162b651 | ||
|
|
5babf0872e | ||
|
|
331232858a |
1
.github/actions/spelling/expect.txt
vendored
1
.github/actions/spelling/expect.txt
vendored
@@ -709,6 +709,7 @@ inprocess
|
||||
INSTEADOF
|
||||
integerdup
|
||||
integerkey
|
||||
interoperability
|
||||
interprocedural
|
||||
intlimits
|
||||
intptr
|
||||
|
||||
31
ChangeLog.md
31
ChangeLog.md
@@ -1,8 +1,6 @@
|
||||
ChangeLog
|
||||
---------
|
||||
|
||||
## v0.11.x (in development)
|
||||
|
||||
### TODO
|
||||
|
||||
- [Engage an "overlapped I/O" on Windows](https://github.com/erthink/libmdbx/issues/224).
|
||||
@@ -20,7 +18,34 @@ ChangeLog
|
||||
- Packages for [Astra Linux](https://astralinux.ru/), [ALT Linux](https://www.altlinux.org/), [ROSA Linux](https://www.rosalinux.ru/), etc.
|
||||
|
||||
|
||||
## v0.10.5 at 2021-10-13
|
||||
## v0.11.1 at 2021-10-23
|
||||
|
||||
### Backward compatibility break:
|
||||
|
||||
The database format signature has been changed to prevent
|
||||
forward-interoperability with an previous releases, which may lead to a
|
||||
[false positive diagnosis of database corruption](https://github.com/erthink/libmdbx/issues/238)
|
||||
due to flaws of an old library versions.
|
||||
|
||||
This change is mostly invisible:
|
||||
|
||||
- previously versions are unable to read/write a new DBs;
|
||||
- but the new release is able to handle an old DBs and will silently upgrade ones.
|
||||
|
||||
Acknowledgements:
|
||||
|
||||
- [Alex Sharov](https://github.com/AskAlexSharov) for reporting and testing.
|
||||
|
||||
|
||||
## v0.10.5 at 2021-10-13 (obsolete, please use v0.11.1)
|
||||
|
||||
Unfortunately, the `v0.10.5` accidentally comes not full-compatible with previous releases:
|
||||
|
||||
- `v0.10.5` can read/processing DBs created by previous releases, i.e. the backward-compatibility is provided;
|
||||
- however, previous releases may lead to false-corrupted state with DB that was touched by `v0.10.5`, i.e. the forward-compatibility is broken for `v0.10.4` and earlier.
|
||||
|
||||
This cannot be fixed, as it requires fixing past versions, which as a result we will just get a current version.
|
||||
Therefore, it is recommended to use `v0.11.1` instead of `v0.10.5`.
|
||||
|
||||
Acknowledgements:
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
version: 0.11.0.{build}
|
||||
version: 0.11.1.{build}
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
|
||||
20
src/core.c
20
src/core.c
@@ -11868,6 +11868,26 @@ __cold static int mdbx_setup_dxb(MDBX_env *env, const int lck_rc,
|
||||
|
||||
atomic_store32(&env->me_lck->mti_discarded_tail,
|
||||
bytes2pgno(env, used_aligned2os_bytes), mo_Relaxed);
|
||||
|
||||
if ((env->me_flags & MDBX_RDONLY) == 0 && env->me_stuck_meta < 0) {
|
||||
for (int n = 0; n < 3; ++n) {
|
||||
MDBX_meta *const meta = METAPAGE(env, n);
|
||||
if (unlikely(unaligned_peek_u64(4, &meta->mm_magic_and_version) !=
|
||||
MDBX_DATA_MAGIC)) {
|
||||
const txnid_t txnid = mdbx_meta_txnid_fluid(env, meta);
|
||||
mdbx_notice("%s %s"
|
||||
"meta[%u], txnid %" PRIaTXN,
|
||||
"updating db-format signature for",
|
||||
META_IS_STEADY(meta) ? "stead-" : "weak-", n, txnid);
|
||||
err = mdbx_override_meta(env, n, txnid, meta);
|
||||
if (unlikely(err != MDBX_SUCCESS)) {
|
||||
mdbx_error("%s meta[%u], txnid %" PRIaTXN ", error %d",
|
||||
"updating db-format signature for", n, txnid, err);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* lck exclusive, lck_rc == MDBX_RESULT_TRUE */
|
||||
|
||||
//---------------------------------------------------- setup madvise/readahead
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#endif
|
||||
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
#endif /* _CRT_SECURE_NO_WARNINGS */
|
||||
#if _MSC_VER > 1800
|
||||
#pragma warning(disable : 4464) /* relative include path contains '..' */
|
||||
#endif
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
// Non-inline part of the libmdbx C++ API (preliminary)
|
||||
//
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
#endif /* _CRT_SECURE_NO_WARNINGS */
|
||||
|
||||
#include "../mdbx.h++"
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#if !defined(_CRT_SECURE_NO_WARNINGS)
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
#endif /* _CRT_SECURE_NO_WARNINGS */
|
||||
#if !defined(_NO_CRT_STDIO_INLINE) && MDBX_BUILD_SHARED_LIBRARY && \
|
||||
!defined(xMDBX_TOOLS) && MDBX_WITHOUT_MSVC_CRT
|
||||
#define _NO_CRT_STDIO_INLINE
|
||||
|
||||
@@ -23,7 +23,9 @@
|
||||
#define _WIN32_WINNT 0x0601 /* Windows 7 */
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif /* _CRT_SECURE_NO_WARNINGS */
|
||||
#pragma warning(push, 1)
|
||||
#pragma warning(disable : 4548) /* expression before comma has no effect; \
|
||||
expected expression with side - effect */
|
||||
|
||||
Reference in New Issue
Block a user