mdbx++: more spelling.

Change-Id: I3f33e695fb918c6a57c39047bba54a72ecb9bc5b
This commit is contained in:
Leonid Yuriev 2020-09-26 18:28:09 +03:00
parent 411b89647c
commit 5627521f16
8 changed files with 87 additions and 33 deletions

View File

@ -19,6 +19,7 @@ alevel
alexey alexey
alignas alignas
alldbs alldbs
ALLDUPS
ALLEXTERNALS ALLEXTERNALS
ALLINPUT ALLINPUT
allleaf allleaf
@ -28,6 +29,7 @@ ALLOCLEN
allones allones
ALLPOSTMESSAGE ALLPOSTMESSAGE
allthrough allthrough
alphabase
AMAX AMAX
amd amd
amsmath amsmath
@ -55,6 +57,7 @@ asm
asprintf asprintf
aspx aspx
assection assection
atal
atexit atexit
atfork atfork
attr attr
@ -68,6 +71,7 @@ autosync
avalue avalue
AVPHYS AVPHYS
badend badend
badpage
bak bak
bareos bareos
barrierattr barrierattr
@ -134,6 +138,7 @@ cattr
cbegin cbegin
cch cch
CCompiler CCompiler
cctype
cdefs cdefs
cdnjs cdnjs
cdst cdst
@ -177,7 +182,10 @@ condpair
config config
constexpr constexpr
copyable copyable
copydetails
copydoc
copyfd copyfd
copyfilerange
copythr copythr
coredump coredump
coreos coreos
@ -201,6 +209,7 @@ cstdarg
cstddef cstddef
cstdint cstdint
cstr cstr
cstring
ctags ctags
ctest ctest
cthr cthr
@ -210,6 +219,7 @@ ctx
ctype ctype
ctz ctz
ctzl ctzl
currentkey
cwalk cwalk
cx cx
cxa cxa
@ -269,6 +279,7 @@ Desh
dest dest
DESTDIR DESTDIR
devtoolset devtoolset
df
dgst dgst
DHTML DHTML
diafile diafile
@ -351,6 +362,7 @@ EFAULT
EHa EHa
EHc EHc
EHsc EHsc
Ei
EIDRM EIDRM
EINTR EINTR
EINVAL EINVAL
@ -420,6 +432,7 @@ Evensen's
ewcommand ewcommand
EWOULDBLOCK EWOULDBLOCK
Exa Exa
exactkey
exactp exactp
exe exe
exename exename
@ -452,10 +465,12 @@ FILELIST
fileno fileno
FILEPATH FILEPATH
filesize filesize
filesync
filesystem filesystem
filetime filetime
fillfactor fillfactor
Firefox Firefox
firstvalue
fixedpoint fixedpoint
FIXME FIXME
flagbit flagbit
@ -584,6 +599,7 @@ HOSTUUID
hpp hpp
hppa hppa
hpux hpux
hrows
htags htags
htm htm
html html
@ -603,6 +619,7 @@ idx
ieeetr ieeetr
ield ield
ietf ietf
iex
IFBLK IFBLK
IFCHR IFCHR
ifdef ifdef
@ -668,6 +685,7 @@ isode
isprint isprint
ISREG ISREG
ISSET ISSET
isspace
issuecomment issuecomment
istty istty
isxdigit isxdigit
@ -701,6 +719,7 @@ KEYEXIST
keygen keygen
keygencase keygencase
keylen keylen
keymode
keyptr keyptr
keysize keysize
keyspace keyspace
@ -719,6 +738,7 @@ kval
largedata largedata
largepage largepage
lastest lastest
lastvalue
lastword lastword
Launay Launay
lcc lcc
@ -775,6 +795,8 @@ locktable
LOGFILE LOGFILE
loglevel loglevel
LONGLONG LONGLONG
lowerbound
lowerboundvalue
LPCSTR LPCSTR
LPDWORD LPDWORD
LPFILETIME LPFILETIME
@ -839,6 +861,7 @@ MAYMOVE
mbarrier mbarrier
mbstowcs mbstowcs
mcount mcount
mcst
mday mday
MDB MDB
mdbenv mdbenv
@ -919,6 +942,7 @@ MRX
msc msc
mscfile mscfile
msdn msdn
msgpack
msize msize
mst mst
msvc msvc
@ -931,6 +955,7 @@ multiarch
MULTILINE MULTILINE
multimap multimap
MULTIOPEN MULTIOPEN
multivalue
munmap munmap
Mup Mup
musl musl
@ -967,8 +992,11 @@ newindx
newkey newkey
newpgno newpgno
nexenta nexenta
nextkey
nextvalue
nf nf
nflags nflags
nkey
nkeys nkeys
nlink nlink
nn nn
@ -1003,11 +1031,13 @@ NOOVERWRITE
nops nops
NOQEMU NOQEMU
nordahead nordahead
NOREPLACE
noreturn noreturn
nospill nospill
nosubdir nosubdir
nosync nosync
NOTFOUND NOTFOUND
notfound
nothrow nothrow
notls notls
notracking notracking
@ -1080,6 +1110,8 @@ osal
osf osf
oskari oskari
OSs OSs
ostream
ostringstream
osubgrouping osubgrouping
osx osx
ote ote
@ -1110,6 +1142,7 @@ pb
pbuf pbuf
PBYTE PBYTE
pcb pcb
pchar
pcount pcount
pcrf pcrf
PDB PDB
@ -1150,6 +1183,7 @@ pmax
pmccntr pmccntr
pmcntenset pmcntenset
pmedvedev pmedvedev
pmr
pmuseren pmuseren
pmwkaa pmwkaa
pn pn
@ -1174,6 +1208,8 @@ PREREQ
prerequirements prerequirements
PRESORTED PRESORTED
prevk prevk
prevkey
prevvalue
PRIa PRIa
PRId PRId
PRIi PRIi
@ -1193,6 +1229,7 @@ projectnumber
propget propget
propput propput
PROT PROT
prot
PSECTION PSECTION
pshared pshared
psrc psrc
@ -1232,6 +1269,7 @@ quicksort
Quinteiro Quinteiro
qwest qwest
radvisory radvisory
RAII
ramdev ramdev
ramdisk ramdisk
ramfs ramfs
@ -1244,6 +1282,7 @@ rdata
rdhwr rdhwr
RDLCK RDLCK
rdonly rdonly
rdp
rdpmccntr rdpmccntr
rdrinfo rdrinfo
rdt rdt
@ -1259,6 +1298,7 @@ readlink
README README
readonly readonly
READWRITE READWRITE
readwrite
realloc realloc
REALMEM REALMEM
REALPATH REALPATH
@ -1321,6 +1361,7 @@ ru
rusage rusage
rw rw
samedata samedata
samelength
SAMSUNG SAMSUNG
savailable savailable
scalability scalability
@ -1389,6 +1430,7 @@ SNAPTHREAD
SNC SNC
snprintf snprintf
Solaris Solaris
Soref
sosuffix sosuffix
sourceforge sourceforge
sourcery sourcery
@ -1398,7 +1440,9 @@ spaceleft
spage spage
spanpgno spanpgno
sparc sparc
SPDX
spinics spinics
Sporaw
sprintf sprintf
sqlite sqlite
src src
@ -1414,6 +1458,7 @@ SSDs
sshfs sshfs
ssize ssize
Sstimate Sstimate
sstream
Ssymbols Ssymbols
standalone standalone
startuml startuml
@ -1428,6 +1473,7 @@ stdatomic
stdc stdc
stddef stddef
stderr stderr
stdexcept
STDGNU STDGNU
stdin stdin
stdint stdint
@ -1487,6 +1533,7 @@ swait
symas symas
SYMLINKS SYMLINKS
syncbytes syncbytes
syncfilerange
syncmode syncmode
syncperiod syncperiod
synctype synctype
@ -1504,6 +1551,7 @@ sz
tablename tablename
tagfile tagfile
tagname tagname
tailroom
tarantool tarantool
tarball tarball
tasklist tasklist
@ -1557,6 +1605,7 @@ tsd
tsize tsize
ttf ttf
ttl ttl
TVvqnwctdis
tw tw
twistylittlepassagesallalike twistylittlepassagesallalike
txkey txkey
@ -1606,6 +1655,8 @@ unregister
unspill unspill
unsync unsync
UNTRACK UNTRACK
upsert
UPSERTING
upsertion upsertion
url url
usec usec
@ -1634,6 +1685,7 @@ validator
valnum valnum
valsize valsize
valstr valstr
valuemode
vasprintf vasprintf
vedisdb vedisdb
VERINFO VERINFO
@ -1657,7 +1709,6 @@ vscprintf
vsnprintf vsnprintf
vvn vvn
vvnw vvnw
Vvqnwcdis
vvv vvv
vvvv vvvv
vvvvv vvvvv
@ -1674,6 +1725,7 @@ WCOREDUMP
wcsnicmp wcsnicmp
wdm wdm
webassembly webassembly
webclient
WERROR WERROR
WEXITSTATUS WEXITSTATUS
WEXTRA WEXTRA
@ -1712,6 +1764,8 @@ WRLCK
WRONLY WRONLY
wsize wsize
WSL WSL
wstr
wstring
WUNTRACED WUNTRACED
www www
WX WX

View File

@ -19,7 +19,7 @@ Added features:
- Explicit `MDBX_SYNC_DURABLE` to sync modes for API clarity. - Explicit `MDBX_SYNC_DURABLE` to sync modes for API clarity.
- Explicit `MDBX_ALLDUPS` and `MDBX_UPSERT` for API clarity. - Explicit `MDBX_ALLDUPS` and `MDBX_UPSERT` for API clarity.
- Support for read transactions preparation (`MDBX_TXN_RDONLY_PREPARE` flag). - Support for read transactions preparation (`MDBX_TXN_RDONLY_PREPARE` flag).
- Support for cursor preparation/preallocation and reusing (`mdbx_cursor_create()` and `mdbx_cursor_bind()` functions). - Support for cursor preparation/(pre)allocation and reusing (`mdbx_cursor_create()` and `mdbx_cursor_bind()` functions).
- Support for checking database using specified meta-page (see `mdbx_chk -h`). - Support for checking database using specified meta-page (see `mdbx_chk -h`).
- Support for turn to the specific meta-page after checking (see `mdbx_chk -h`). - Support for turn to the specific meta-page after checking (see `mdbx_chk -h`).
- Support for explicit reader threads (de)registration. - Support for explicit reader threads (de)registration.
@ -37,7 +37,7 @@ Deprecated functions and flags:
Fixes: Fixes:
- Fix `mdbx_strerror()` for `MDBX_BUSY` error (no error description is returned). - Fix `mdbx_strerror()` for `MDBX_BUSY` error (no error description is returned).
- Fix update internal meta-geo information in read-only mode (`EACCESS` or `EBADF` error). - Fix update internal meta-geo information in read-only mode (`EACCESS` or `EBADFD` error).
- Fix `mdbx_page_get()` null-defer when DB corrupted (crash by `SIGSEGV`). - Fix `mdbx_page_get()` null-defer when DB corrupted (crash by `SIGSEGV`).
- Fix `mdbx_env_open()` for re-opening after non-fatal errors (`mdbx_chk` unexpected failures). - Fix `mdbx_env_open()` for re-opening after non-fatal errors (`mdbx_chk` unexpected failures).
- Workaround for MSVC 19.27 `static_assert()` bug. - Workaround for MSVC 19.27 `static_assert()` bug.

View File

@ -33,7 +33,7 @@ MDBX_OPTIONS ?= -DNDEBUG=1
CFLAGS ?= -O2 -g -Wall -Werror -Wextra -Wpedantic -ffunction-sections -fPIC -fvisibility=hidden -std=gnu11 -pthread -Wno-error=attributes $(CFLAGS_EXTRA) CFLAGS ?= -O2 -g -Wall -Werror -Wextra -Wpedantic -ffunction-sections -fPIC -fvisibility=hidden -std=gnu11 -pthread -Wno-error=attributes $(CFLAGS_EXTRA)
# -Wno-tautological-compare # -Wno-tautological-compare
CXX ?= g++ CXX ?= g++
# choicing C++ standard with deferred simple variable expansion trick # Choosing C++ standard with deferred simple variable expansion trick
CXXSTD ?= $(eval CXXSTD := $$(shell PROBE=$$$$([ -f mdbx.c++ ] && echo mdbx.c++ || echo src/mdbx.c++); for std in gnu++20 c++20 gnu++2a c++2a gnu++17 c++17 gnu++14 c++14 gnu+11 c++11; do $(CXX) -std=$$$${std} -c $$$${PROBE} -o /dev/null 2>/dev/null >/dev/null && echo "-std=$$$${std}" && exit; done))$(CXXSTD) CXXSTD ?= $(eval CXXSTD := $$(shell PROBE=$$$$([ -f mdbx.c++ ] && echo mdbx.c++ || echo src/mdbx.c++); for std in gnu++20 c++20 gnu++2a c++2a gnu++17 c++17 gnu++14 c++14 gnu+11 c++11; do $(CXX) -std=$$$${std} -c $$$${PROBE} -o /dev/null 2>/dev/null >/dev/null && echo "-std=$$$${std}" && exit; done))$(CXXSTD)
CXXFLAGS = $(CXXSTD) $(filter-out -std=gnu11,$(CFLAGS)) CXXFLAGS = $(CXXSTD) $(filter-out -std=gnu11,$(CFLAGS))

8
mdbx.h
View File

@ -93,11 +93,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
\defgroup c_opening Opening & Closing \defgroup c_opening Opening & Closing
\defgroup c_transactions Transactions \defgroup c_transactions Transactions
\defgroup c_dbi Databases \defgroup c_dbi Databases
\defgroup c_crud Create/Read/Update/Delete (see Roadmap in details) \defgroup c_crud Create/Read/Update/Delete (see Quick Reference in details)
\details \details
\anchor c_crud_hints \anchor c_crud_hints
# Quick reference for Insert/Update/Delete operations # Quick Reference for Insert/Update/Delete operations
Historically, libmdbx inherits the API basis from LMDB, where it is often Historically, libmdbx inherits the API basis from LMDB, where it is often
difficult to select flags/options and functions for the desired operation. difficult to select flags/options and functions for the desired operation.
@ -154,7 +154,7 @@ as a duplicates or as like a multiple values corresponds to keys.
| _DELETING_||| | _DELETING_|||
|Key is absent Error since no such key |\ref mdbx_del() or \ref mdbx_replace()|Error \ref MDBX_NOTFOUND| |Key is absent Error since no such key |\ref mdbx_del() or \ref mdbx_replace()|Error \ref MDBX_NOTFOUND|
|Key exist Delete all values corresponds given key|\ref mdbx_del() with the parameter `data = NULL`|Deletion| |Key exist Delete all values corresponds given key|\ref mdbx_del() with the parameter `data = NULL`|Deletion|
|Key exist Delete particular value corresponds given key|\ref mdbx_del() with the parameter `data` filled with the value that wanna to delete, or \ref mdbx_replace() with \ref MDBX_CURRENT + \ref MDBX_NOOVERWRITE and the `old_value` parameter filled with the value that wanna to delete and `new_data = NULL`| Deletion or \ref MDBX_NOTFOUND if no such ker-value pair| |Key exist Delete particular value corresponds given key|\ref mdbx_del() with the parameter `data` filled with the value that wanna to delete, or \ref mdbx_replace() with \ref MDBX_CURRENT + \ref MDBX_NOOVERWRITE and the `old_value` parameter filled with the value that wanna to delete and `new_data = NULL`| Deletion or \ref MDBX_NOTFOUND if no such key-value pair|
|Delete one value at the current cursor position|\ref mdbx_cursor_del() with \ref MDBX_CURRENT flag|Deletion only the current entry| |Delete one value at the current cursor position|\ref mdbx_cursor_del() with \ref MDBX_CURRENT flag|Deletion only the current entry|
|Delete all values of key at the current cursor position|\ref mdbx_cursor_del() with with \ref MDBX_ALLDUPS flag|Deletion all duplicates of key (all multi-values) at the current cursor position| |Delete all values of key at the current cursor position|\ref mdbx_cursor_del() with with \ref MDBX_ALLDUPS flag|Deletion all duplicates of key (all multi-values) at the current cursor position|
@ -1603,7 +1603,7 @@ enum MDBX_error_t {
MDBX_TXN_OVERLAPPING = -30415, MDBX_TXN_OVERLAPPING = -30415,
/* The last of MDBX-added error codes */ /* The last of MDBX-added error codes */
MDBX_LAST_ADDED_ERRCODEE = MDBX_TXN_OVERLAPPING, MDBX_LAST_ADDED_ERRCODE = MDBX_TXN_OVERLAPPING,
#if defined(_WIN32) || defined(_WIN64) #if defined(_WIN32) || defined(_WIN64)
MDBX_ENODATA = ERROR_HANDLE_EOF, MDBX_ENODATA = ERROR_HANDLE_EOF,

View File

@ -148,7 +148,7 @@
base for dll-interface 'mdbx::BAR' */ base for dll-interface 'mdbx::BAR' */
/* MSVC is mad and can generate this warning for its own intermediate /* MSVC is mad and can generate this warning for its own intermediate
* automatically generated code, which becomes unreachable after some kinds of * automatically generated code, which becomes unreachable after some kinds of
* optimization (copy ellision, etc). */ * optimization (copy elision, etc). */
#pragma warning(disable : 4702) /* unreachable code */ #pragma warning(disable : 4702) /* unreachable code */
#endif /* _MSC_VER (warnings) */ #endif /* _MSC_VER (warnings) */
@ -175,7 +175,7 @@ using version_info = ::MDBX_version_info;
MDBX_CXX11_CONSTEXPR const version_info &get_version() noexcept; MDBX_CXX11_CONSTEXPR const version_info &get_version() noexcept;
/// \copydoc MDBX_build_info /// \copydoc MDBX_build_info
using build_info = ::MDBX_build_info; using build_info = ::MDBX_build_info;
/// \brief Resutrns libmdbx build information. /// \brief Returns libmdbx build information.
MDBX_CXX11_CONSTEXPR const build_info &get_build() noexcept; MDBX_CXX11_CONSTEXPR const build_info &get_build() noexcept;
/// \brief constexpr-compatible strlen(). /// \brief constexpr-compatible strlen().
@ -351,7 +351,7 @@ MDBX_DECLARE_EXCEPTION(max_readers_reached);
MDBX_DECLARE_EXCEPTION(multivalue); MDBX_DECLARE_EXCEPTION(multivalue);
MDBX_DECLARE_EXCEPTION(no_data); MDBX_DECLARE_EXCEPTION(no_data);
MDBX_DECLARE_EXCEPTION(not_found); MDBX_DECLARE_EXCEPTION(not_found);
MDBX_DECLARE_EXCEPTION(operation_not_permited); MDBX_DECLARE_EXCEPTION(operation_not_permitted);
MDBX_DECLARE_EXCEPTION(permission_denied_or_not_writeable); MDBX_DECLARE_EXCEPTION(permission_denied_or_not_writeable);
MDBX_DECLARE_EXCEPTION(reader_slot_busy); MDBX_DECLARE_EXCEPTION(reader_slot_busy);
MDBX_DECLARE_EXCEPTION(remote_media); MDBX_DECLARE_EXCEPTION(remote_media);
@ -796,8 +796,8 @@ struct LIBMDBX_API_TYPE slice : public ::MDBX_val {
} }
protected: protected:
MDBX_CXX11_CONSTEXPR slice(size_t invalid_lenght) noexcept MDBX_CXX11_CONSTEXPR slice(size_t invalid_length) noexcept
: ::MDBX_val({nullptr, invalid_lenght}) {} : ::MDBX_val({nullptr, invalid_length}) {}
}; };
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -841,7 +841,7 @@ template <class ALLOCATOR = legacy_allocator> class buffer {
public: public:
/// \todo buffer& operator<<(buffer&, ...) for writing /// \todo buffer& operator<<(buffer&, ...) for writing
/// \todo buffer& operator>>(buffer&, ...) for reading (deletages to slice) /// \todo buffer& operator>>(buffer&, ...) for reading (delegated to slice)
/// \todo template<class X> key(X) for encoding keys while writing /// \todo template<class X> key(X) for encoding keys while writing
using allocator_type = ALLOCATOR; using allocator_type = ALLOCATOR;
@ -877,14 +877,14 @@ public:
} }
/// \brief Returns the number of bytes that available in currently allocated /// \brief Returns the number of bytes that available in currently allocated
/// storage ahead of the currently beginning of data. /// storage ahead the currently beginning of data.
MDBX_NOTHROW_PURE_FUNCTION MDBX_CXX20_CONSTEXPR size_t MDBX_NOTHROW_PURE_FUNCTION MDBX_CXX20_CONSTEXPR size_t
headroom() const noexcept { headroom() const noexcept {
return is_freestanding() ? slice_.byte_ptr() - silo_begin() : 0; return is_freestanding() ? slice_.byte_ptr() - silo_begin() : 0;
} }
/// \brief Returns the number of bytes that available in currently allocated /// \brief Returns the number of bytes that available in currently allocated
/// storage afther of the currently data end. /// storage after the currently data end.
MDBX_NOTHROW_PURE_FUNCTION MDBX_CXX20_CONSTEXPR size_t MDBX_NOTHROW_PURE_FUNCTION MDBX_CXX20_CONSTEXPR size_t
tailroom() const noexcept { tailroom() const noexcept {
return is_freestanding() ? capacity() - headroom() - slice_.length() : 0; return is_freestanding() ? capacity() - headroom() - slice_.length() : 0;
@ -1693,7 +1693,7 @@ public:
enum : int64_t { enum : int64_t {
default_value = -1, ///< Means "keep current or use default" default_value = -1, ///< Means "keep current or use default"
minimal_value = 0, ///< Means "minimal acceptable" minimal_value = 0, ///< Means "minimal acceptable"
maximal_value = INTPTR_MAX, ///< Means "miximal acceptable" maximal_value = INTPTR_MAX, ///< Means "maximal acceptable"
kB = 1000, ///< \f$10^{3}\f$ bytes kB = 1000, ///< \f$10^{3}\f$ bytes
MB = kB * 1000, ///< \f$10^{6}\f$ bytes MB = kB * 1000, ///< \f$10^{6}\f$ bytes
GB = MB * 1000, ///< \f$10^{9}\f$ bytes GB = MB * 1000, ///< \f$10^{9}\f$ bytes
@ -1982,7 +1982,7 @@ public:
/// ///
inline env &set_sync_threshold(size_t bytes); inline env &set_sync_threshold(size_t bytes);
/// \brief Sets relative period since the last unsteay commit to force flush /// \brief Sets relative period since the last unsteady commit to force flush
/// the data buffers to disk, for non-sync durability modes. /// the data buffers to disk, for non-sync durability modes.
/// ///
/// The relative period value affects all processes which operates with given /// The relative period value affects all processes which operates with given
@ -2000,10 +2000,10 @@ public:
/// than mean no any timeout checked, and no additional flush will be made. /// than mean no any timeout checked, and no additional flush will be made.
/// ///
/// \param [in] seconds_16dot16 The period in 1/65536 of second when a /// \param [in] seconds_16dot16 The period in 1/65536 of second when a
/// synchronous flush would be made since the last unsteay commit. /// synchronous flush would be made since the last unsteady commit.
inline env &set_sync_period(unsigned seconds_16dot16); inline env &set_sync_period(unsigned seconds_16dot16);
/// \brief Sets relative period since the last unsteay commit to force flush /// \brief Sets relative period since the last unsteady commit to force flush
/// the data buffers to disk, for non-sync durability modes. /// the data buffers to disk, for non-sync durability modes.
/// ///
/// The relative period value affects all processes which operates with given /// The relative period value affects all processes which operates with given
@ -2021,7 +2021,7 @@ public:
/// than mean no any timeout checked, and no additional flush will be made. /// than mean no any timeout checked, and no additional flush will be made.
/// ///
/// \param [in] seconds The period in second when a synchronous flush would /// \param [in] seconds The period in second when a synchronous flush would
/// be made since the last unsteay commit. /// be made since the last unsteady commit.
inline env &set_sync_period(double seconds); inline env &set_sync_period(double seconds);
/// \brief Alter environment flags. /// \brief Alter environment flags.
@ -2066,7 +2066,7 @@ public:
mdbx_pid_t pid; ///< The reader process ID. mdbx_pid_t pid; ///< The reader process ID.
mdbx_tid_t thread; ///< The reader thread ID. mdbx_tid_t thread; ///< The reader thread ID.
uint64_t transaction_id; ///< The ID of the transaction being read, uint64_t transaction_id; ///< The ID of the transaction being read,
///< i.e. the MVCC-snaphot number. ///< i.e. the MVCC-snapshot number.
uint64_t transaction_lag; ///< The lag from a recent MVCC-snapshot, uint64_t transaction_lag; ///< The lag from a recent MVCC-snapshot,
///< i.e. the number of committed write ///< i.e. the number of committed write
/// transactions since the current read /// transactions since the current read
@ -2096,7 +2096,7 @@ public:
/// \returns The last value returned from visitor' functor. /// \returns The last value returned from visitor' functor.
template <typename VISITOR> inline int enumerate_readers(VISITOR &visitor); template <typename VISITOR> inline int enumerate_readers(VISITOR &visitor);
/// \brief Checks for stale readers in the lock tablea and /// \brief Checks for stale readers in the lock table and
/// return number of cleared slots. /// return number of cleared slots.
inline unsigned check_readers(); inline unsigned check_readers();
@ -2104,7 +2104,7 @@ public:
/// ///
/// Such callback will be triggered in a case where there is not enough free /// Such callback will be triggered in a case where there is not enough free
/// space in the database due to long read transaction(s) which impedes /// space in the database due to long read transaction(s) which impedes
/// reusing the pages of an old MVCC shapshot(s). /// reusing the pages of an old MVCC snapshot(s).
/// ///
/// Using this callback you can choose how to get out of the situation: /// Using this callback you can choose how to get out of the situation:
/// - abort the record transaction with an error; /// - abort the record transaction with an error;
@ -2771,7 +2771,7 @@ MDBX_CXX11_CONSTEXPR bool error::is_mdbx_error() const noexcept {
return (code() >= MDBX_FIRST_LMDB_ERRCODE && return (code() >= MDBX_FIRST_LMDB_ERRCODE &&
code() <= MDBX_LAST_LMDB_ERRCODE) || code() <= MDBX_LAST_LMDB_ERRCODE) ||
(code() >= MDBX_FIRST_ADDED_ERRCODE && (code() >= MDBX_FIRST_ADDED_ERRCODE &&
code() <= MDBX_LAST_ADDED_ERRCODEE); code() <= MDBX_LAST_ADDED_ERRCODE);
} }
inline void error::throw_exception(int error_code) { inline void error::throw_exception(int error_code) {
@ -3488,7 +3488,7 @@ inline int env::enumerate_readers(VISITOR &visitor) {
}; };
reader_visitor_thunk thunk(visitor); reader_visitor_thunk thunk(visitor);
const auto rc = ::mdbx_reader_list(*this, thunk.cb, &thunk); const auto rc = ::mdbx_reader_list(*this, thunk.cb, &thunk);
thunk.rethow_catched(); thunk.rethrow_captured();
return rc; return rc;
} }

View File

@ -14981,9 +14981,9 @@ static __cold int mdbx_page_check(MDBX_cursor *const mc,
continue; continue;
} }
if (unlikely(number_of_ovpages(env, dsize) != lp->mp_pages)) if (unlikely(number_of_ovpages(env, dsize) != lp->mp_pages))
rc = bad_page( rc =
mp, "big-node size (%zu) mismatch overflow npagse size (%u)\n", bad_page(mp, "big-node size (%zu) mismatch n-pages size (%u)\n",
dsize, lp->mp_pages); dsize, lp->mp_pages);
} }
continue; continue;
} }

View File

@ -159,7 +159,7 @@ class bug : public std::runtime_error {
public: public:
bug(const trouble_location &) noexcept; bug(const trouble_location &) noexcept;
/* temporary workaround for "private field 'FOO' is not used" from CLANG /* temporary workaround for "private field 'FOO' is not used" from CLANG
* and for "function 'BAR' was declared but never referenced" fomr LCC. */ * and for "function 'BAR' was declared but never referenced" from LCC. */
#ifndef __LCC__ #ifndef __LCC__
const trouble_location &location() const noexcept { return location_; } const trouble_location &location() const noexcept { return location_; }
#endif #endif
@ -311,7 +311,7 @@ DEFINE_EXCEPTION(max_readers_reached)
DEFINE_EXCEPTION(multivalue) DEFINE_EXCEPTION(multivalue)
DEFINE_EXCEPTION(no_data) DEFINE_EXCEPTION(no_data)
DEFINE_EXCEPTION(not_found) DEFINE_EXCEPTION(not_found)
DEFINE_EXCEPTION(operation_not_permited) DEFINE_EXCEPTION(operation_not_permitted)
DEFINE_EXCEPTION(permission_denied_or_not_writeable) DEFINE_EXCEPTION(permission_denied_or_not_writeable)
DEFINE_EXCEPTION(reader_slot_busy) DEFINE_EXCEPTION(reader_slot_busy)
DEFINE_EXCEPTION(remote_media) DEFINE_EXCEPTION(remote_media)
@ -397,7 +397,7 @@ __cold void error::throw_exception() const {
CASE_EXCEPTION(multivalue, MDBX_EMULTIVAL); CASE_EXCEPTION(multivalue, MDBX_EMULTIVAL);
CASE_EXCEPTION(no_data, MDBX_ENODATA); CASE_EXCEPTION(no_data, MDBX_ENODATA);
CASE_EXCEPTION(not_found, MDBX_NOTFOUND); CASE_EXCEPTION(not_found, MDBX_NOTFOUND);
CASE_EXCEPTION(operation_not_permited, MDBX_EPERM); CASE_EXCEPTION(operation_not_permitted, MDBX_EPERM);
CASE_EXCEPTION(permission_denied_or_not_writeable, MDBX_EACCESS); CASE_EXCEPTION(permission_denied_or_not_writeable, MDBX_EACCESS);
CASE_EXCEPTION(reader_slot_busy, MDBX_BAD_RSLOT); CASE_EXCEPTION(reader_slot_busy, MDBX_BAD_RSLOT);
CASE_EXCEPTION(remote_media, MDBX_EREMOTE); CASE_EXCEPTION(remote_media, MDBX_EREMOTE);

View File

@ -1050,7 +1050,7 @@ int main(int argc, char *argv[]) {
if (argc < 2) if (argc < 2)
usage(prog); usage(prog);
for (int i; (i = getopt(argc, argv, "Vvqnwc012tTdis:")) != EOF;) { for (int i; (i = getopt(argc, argv, "012TVvqnwctdis:")) != EOF;) {
switch (i) { switch (i) {
case 'V': case 'V':
printf("mdbx_chk version %d.%d.%d.%d\n" printf("mdbx_chk version %d.%d.%d.%d\n"