diff options
author | Leonid Yuriev <leo@yuriev.ru> | 2020-10-08 02:02:18 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-10-09 16:50:37 +0300 |
commit | a519d4617ed83a2167a693ae87934e56889fef05 (patch) | |
tree | 85c3aea76fe15268fc0891cf18c328913c6d4347 /libs/libmdbx/src/man1 | |
parent | bc58e7ec8ef67c37b6d302eaa2e76deedec03106 (diff) |
libmdbx: switch to original amalgamated source code (v0.9.1.18)
Amalgamated source code is the recommended form for
embedding libmdbx in non-CMake build systems. This amalgamated
version contains a minimum of files, is fully ready for use,
and make impossible a number of errors.
To upgrade or switch to a different version, just unpack
to the `src` subdirectory a corresponding `libmdbx-amalgamated-X_Y_Z.zip`
at the https://github.com/erthink/libmdbx/releases.
For instance, the https://github.com/erthink/libmdbx/releases/download/v0.9.2/libmdbx-amalgamated-0_9_2.zip
for the next release.
--
Minimal changes have been made to the build configuration:
1. For use the standard `DllMain()` entry of libmdbx:
- added the `MDBX_BUILD_SHARED_LIBRARY=1` option;
- removed the `MDBX_CONFIG_MANUAL_TLS_CALLBACK` option;
- deleted the `miranda.c` file containing only `DllMain()`
with the `mdbx_dll_handle()` call, now this is done by the library itself.
2. Removed refs to extra files (that missing in the amalgamated source code):
- for building `libmdbx.dll` only the `mdbx.h` and `mdbx.c` are used,
but not `mdbx.c++` for a C++ API;
- for building the `mdbx_chk`, `mdbx_load`, and `mdbx_dump` utilities
only it own sources are used.
--
Last libmdbx changes:
- Fixed missing installation of `mdbx.h++`.
- Fixed use of obsolete `__noreturn`.
- Fixed use of `yield` instruction on ARM if unsupported.
- Added pthread workaround for buggy toolchain/cmake/buildroot.
- Fixed use of `pthread_yield()` for non-GLIBC.
- Fixed use of `RegGetValueA()` on Windows 2000/XP.
- Fixed use of `GetTickCount64()` on Windows 2000/XP.
- Fixed opening DB on a network shares (in the exclusive mode).
- Fixed copy&paste typos.
- Fixed minor false-positive GCC warning.
Diffstat (limited to 'libs/libmdbx/src/man1')
-rw-r--r-- | libs/libmdbx/src/man1/mdbx_chk.1 | 98 | ||||
-rw-r--r-- | libs/libmdbx/src/man1/mdbx_copy.1 | 67 | ||||
-rw-r--r-- | libs/libmdbx/src/man1/mdbx_dump.1 | 93 | ||||
-rw-r--r-- | libs/libmdbx/src/man1/mdbx_load.1 | 104 | ||||
-rw-r--r-- | libs/libmdbx/src/man1/mdbx_stat.1 | 78 |
5 files changed, 440 insertions, 0 deletions
diff --git a/libs/libmdbx/src/man1/mdbx_chk.1 b/libs/libmdbx/src/man1/mdbx_chk.1 new file mode 100644 index 0000000000..0348f90b06 --- /dev/null +++ b/libs/libmdbx/src/man1/mdbx_chk.1 @@ -0,0 +1,98 @@ +.\" Copyright 2015-2020 Leonid Yuriev <leo@yuriev.ru>. +.\" Copying restrictions apply. See COPYRIGHT/LICENSE. +.TH MDBX_CHK 1 "2020-09-25" "MDBX 0.9.1" +.SH NAME +mdbx_chk \- MDBX checking tool +.SH SYNOPSIS +.B mdbx_chk +[\c +.BR \-V ] +[\c +.BR \-v [ v [ v ]]] +[\c +.BR \-n ] +[\c +.BR \-q ] +[\c +.BR \-c ] +[\c +.BR \-w ] +[\c +.BR \-d ] +[\c +.BR \-i ] +[\c +.BI \-s \ subdb\fR] +.BR \ dbpath +.SH DESCRIPTION +The +.B mdbx_chk +utility intended to check an MDBX database file. +.SH OPTIONS +.TP +.BR \-V +Write the library version number to the standard output, and exit. +.TP +.BR \-v +Produce verbose output, including summarize space and page usage statistics. +If \fB\-vv\fP is given, be more verbose, show summarized B-tree info +and space allocation. +If \fB\-vvv\fP is given, be more verbose, include summarized statistics +of leaf B-tree pages. +If \fB\-vvvv\fP is given, be even more verbose, show info of each page +during B-tree traversal and basic info of each GC record. +If \fB\-vvvvv\fP is given, turn maximal verbosity, display the full list +of page IDs in the GC records and size of each key-value pair of database(s). +.TP +.BR \-q +Be quiet; do not output anything even if an error was detected. +.TP +.BR \-c +Force using cooperative mode while opening environment, i.e. don't try to open +in exclusive/monopolistic mode. Only exclusive/monopolistic mode allow complete +check, including full check of all meta-pages and actual size of database file. +.TP +.BR \-w +Open environment in read-write mode and lock for writing while checking. +This could be impossible if environment already used by another process(s) +in an incompatible read-write mode. This allow rollback to last steady commit +(in case environment was not closed properly) and then check transaction IDs +of meta-pages. Otherwise, without \fB\-w\fP option environment will be +opened in read-only mode. +.TP +.BR \-d +Disable page-by-page traversal of B-tree. In this case, without B-tree +traversal, it is unable to check for lost-unused pages nor for double-used +pages. +.TP +.BR \-i +Ignore wrong order errors, which will likely false-positive if custom +comparator(s) was used. +.TP +.BR \-s \ subdb +Verify and show info only for a specific subdatabase. +.TP +.BR \-0 | \-1 | \-2 +Using specific meta-page 0, or 2 for checking. +.TP +.BR \-t +Turn to a specified meta-page on successful check. +.TP +.BR \-T +Turn to a specified meta-page EVEN ON UNSUCCESSFUL CHECK! +.TP +.BR \-n +Open MDBX environment(s) which do not use subdirectories. +This is legacy option. For now MDBX handles this automatically. + +.SH DIAGNOSTICS +Exit status is zero if no errors occur. Errors result in a non-zero exit status +and a diagnostic message being written to standard error +if no quiet mode was requested. +.SH "SEE ALSO" +.BR mdbx_stat (1), +.BR mdbx_copy (1), +.BR mdbx_dump (1), +.BR mdbx_load (1) +.SH AUTHOR +Leonid Yuriev <https://github.com/erthink> diff --git a/libs/libmdbx/src/man1/mdbx_copy.1 b/libs/libmdbx/src/man1/mdbx_copy.1 new file mode 100644 index 0000000000..83fbc904b9 --- /dev/null +++ b/libs/libmdbx/src/man1/mdbx_copy.1 @@ -0,0 +1,67 @@ +.\" Copyright 2015-2020 Leonid Yuriev <leo@yuriev.ru>. +.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved. +.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>. +.\" Copying restrictions apply. See COPYRIGHT/LICENSE. +.TH MDBX_COPY 1 "2020-09-25" "MDBX 0.9.1" +.SH NAME +mdbx_copy \- MDBX environment copy tool +.SH SYNOPSIS +.B mdbx_copy +[\c +.BR \-V ] +[\c +.BR \-q ] +[\c +.BR \-c ] +[\c +.BR \-n ] +.B src_path +[\c +.BR dest_path ] +.SH DESCRIPTION +The +.B mdbx_copy +utility copies an MDBX environment. The environment can +be copied regardless of whether it is currently in use. +No lockfile is created, since it gets recreated at need. + +If +.I dest_path +is specified it must be the path of an empty directory +for storing the backup. Otherwise, the backup will be +written to stdout. + +.SH OPTIONS +.TP +.BR \-V +Write the library version number to the standard output, and exit. +.TP +.BR \-q +Be quiet. +.TP +.BR \-c +Compact while copying. Only current data pages will be copied; freed +or unused pages will be omitted from the copy. This option will +slow down the backup process as it is more CPU-intensive. +Currently it fails if the environment has suffered a page leak. +.TP +.BR \-n +Open MDBX environment(s) which do not use subdirectories. +This is legacy option. For now MDBX handles this automatically. + +.SH DIAGNOSTICS +Exit status is zero if no errors occur. +Errors result in a non-zero exit status and +a diagnostic message being written to standard error. +.SH CAVEATS +This utility can trigger significant file size growth if run +in parallel with write transactions, because pages which they +free during copying cannot be reused until the copy is done. +.SH "SEE ALSO" +.BR mdbx_dump (1), +.BR mdbx_chk (1), +.BR mdbx_stat (1), +.BR mdbx_load (1) +.SH AUTHOR +Howard Chu of Symas Corporation <http://www.symas.com>, +Leonid Yuriev <https://github.com/erthink> diff --git a/libs/libmdbx/src/man1/mdbx_dump.1 b/libs/libmdbx/src/man1/mdbx_dump.1 new file mode 100644 index 0000000000..bdb4d55366 --- /dev/null +++ b/libs/libmdbx/src/man1/mdbx_dump.1 @@ -0,0 +1,93 @@ +.\" Copyright 2015-2020 Leonid Yuriev <leo@yuriev.ru>. +.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved. +.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>. +.\" Copying restrictions apply. See COPYRIGHT/LICENSE. +.TH MDBX_DUMP 1 "2020-09-25" "MDBX 0.9.1" +.SH NAME +mdbx_dump \- MDBX environment export tool +.SH SYNOPSIS +.B mdbx_dump +[\c +.BR \-V ] +[\c +.BR \-q ] +[\c +.BI \-f \ file\fR] +[\c +.BR \-l ] +[\c +.BR \-p ] +[\c +.BR \-a \ | +.BI \-s \ subdb\fR] +[\c +.BR \-r ] +[\c +.BR \-n ] +.BR \ dbpath +.SH DESCRIPTION +The +.B mdbx_dump +utility reads a database and writes its contents to the +standard output using a portable flat-text format +understood by the +.BR mdbx_load (1) +utility. +.SH OPTIONS +.TP +.BR \-V +Write the library version number to the standard output, and exit. +.TP +.BR \-q +Be quiet. +.TP +.BR \-f \ file +Write to the specified file instead of to the standard output. +.TP +.BR \-l +List the databases stored in the environment. Just the +names will be listed, no data will be output. +.TP +.BR \-p +If characters in either the key or data items are printing characters (as +defined by isprint(3)), output them directly. This option permits users to +use standard text editors and tools to modify the contents of databases. + +Note: different systems may have different notions about what characters +are considered printing characters, and databases dumped in this manner may +be less portable to external systems. +.TP +.BR \-a +Dump all of the subdatabases in the environment. +.TP +.BR \-s \ subdb +Dump a specific subdatabase. If no database is specified, only the main database is dumped. +.TP +.BR \-r +Rescure mode. Ignore some errors to dump corrupted DB. +.TP +.BR \-n +Dump an MDBX database which does not use subdirectories. +This is legacy option. For now MDBX handles this automatically. + +.SH DIAGNOSTICS +Exit status is zero if no errors occur. +Errors result in a non-zero exit status and +a diagnostic message being written to standard error. + +Dumping and reloading databases that use user-defined comparison functions +will result in new databases that use the default comparison functions. +\fBIn this case it is quite likely that the reloaded database will be +damaged beyond repair permitting neither record storage nor retrieval.\fP + +The only available workaround is to modify the source for the +.BR mdbx_load (1) +utility to load the database using the correct comparison functions. +.SH "SEE ALSO" +.BR mdbx_load (1), +.BR mdbx_copy (1), +.BR mdbx_chk (1), +.BR mdbx_stat (1) +.SH AUTHOR +Howard Chu of Symas Corporation <http://www.symas.com>, +Leonid Yuriev <https://github.com/erthink> diff --git a/libs/libmdbx/src/man1/mdbx_load.1 b/libs/libmdbx/src/man1/mdbx_load.1 new file mode 100644 index 0000000000..950ae0283e --- /dev/null +++ b/libs/libmdbx/src/man1/mdbx_load.1 @@ -0,0 +1,104 @@ +.\" Copyright 2015-2020 Leonid Yuriev <leo@yuriev.ru>. +.\" Copyright 2014-2015 Howard Chu, Symas Corp. All Rights Reserved. +.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>. +.\" Copying restrictions apply. See COPYRIGHT/LICENSE. +.TH MDBX_LOAD 1 "2020-09-25" "MDBX 0.9.1" +.SH NAME +mdbx_load \- MDBX environment import tool +.SH SYNOPSIS +.B mdbx_load +[\c +.BR \-V ] +[\c +.BR \-q ] +[\c +.BR \-a ] +[\c +.BI \-f \ file\fR] +[\c +.BI \-s \ subdb\fR] +[\c +.BR \-N ] +[\c +.BR \-T ] +[\c +.BR \-r ] +[\c +.BR \-n ] +.BR \ dbpath +.SH DESCRIPTION +The +.B mdbx_load +utility reads from the standard input and loads it into the +MDBX environment +.BR dbpath . + +The input to +.B mdbx_load +must be in the output format specified by the +.BR mdbx_dump (1) +utility or as specified by the +.B -T +option below. + +A simple escape mechanism, where newline and backslash (\\) characters are special, is +applied to the text input. Newline characters are interpreted as record separators. +Backslash characters in the text will be interpreted in one of two ways: If the backslash +character precedes another backslash character, the pair will be interpreted as a literal +backslash. If the backslash character precedes any other character, the two characters +following the backslash will be interpreted as a hexadecimal specification of a single +character; for example, \\0a is a newline character in the ASCII character set. + +For this reason, any backslash or newline characters that naturally occur in the text +input must be escaped to avoid misinterpretation by +.BR mdbx_load . + +.SH OPTIONS +.TP +.BR \-V +Write the library version number to the standard output, and exit. +.TP +.BR \-q +Be quiet. +.TP +.BR \-a +Append all records in the order they appear in the input. The input is assumed to already be +in correctly sorted order and no sorting or checking for redundant values will be performed. +This option must be used to reload data that was produced by running +.B mdbx_dump +on a database that uses custom compare functions. +.TP +.BR \-f \ file +Read from the specified file instead of from the standard input. +.TP +.BR \-s \ subdb +Load a specific subdatabase. If no database is specified, data is loaded into the main database. +.TP +.BR \-N +Don't overwrite existing records when loading into an already existing database; just skip them. +.TP +.BR \-T +Load data from simple text files. The input must be paired lines of text, where the first +line of the pair is the key item, and the second line of the pair is its corresponding +data item. +.TP +.BR \-r +Rescure mode. Ignore errors to load corrupted DB dump. +.TP +.BR \-n +Load an MDBX database which does not use subdirectories. +This is legacy option. For now MDBX handles this automatically. + +.SH DIAGNOSTICS +Exit status is zero if no errors occur. +Errors result in a non-zero exit status and +a diagnostic message being written to standard error. + +.SH "SEE ALSO" +.BR mdbx_dump (1), +.BR mdbx_chk (1), +.BR mdbx_stat (1), +.BR mdbx_copy (1) +.SH AUTHOR +Howard Chu of Symas Corporation <http://www.symas.com>, +Leonid Yuriev <https://github.com/erthink> diff --git a/libs/libmdbx/src/man1/mdbx_stat.1 b/libs/libmdbx/src/man1/mdbx_stat.1 new file mode 100644 index 0000000000..ec0ffb1280 --- /dev/null +++ b/libs/libmdbx/src/man1/mdbx_stat.1 @@ -0,0 +1,78 @@ +.\" Copyright 2015-2020 Leonid Yuriev <leo@yuriev.ru>. +.\" Copyright 2012-2015 Howard Chu, Symas Corp. All Rights Reserved. +.\" Copyright 2015,2016 Peter-Service R&D LLC <http://billing.ru/>. +.\" Copying restrictions apply. See COPYRIGHT/LICENSE. +.TH MDBX_STAT 1 "2020-09-25" "MDBX 0.9.1" +.SH NAME +mdbx_stat \- MDBX environment status tool +.SH SYNOPSIS +.B mdbx_stat +[\c +.BR \-V ] +[\c +.BR \-q ] +[\c +.BR \-e ] +[\c +.BR \-f [ f [ f ]]] +[\c +.BR \-r [ r ]] +[\c +.BR \-a \ | +.BI \-s \ subdb\fR] +.BR \ dbpath +[\c +.BR \-n ] +.SH DESCRIPTION +The +.B mdbx_stat +utility displays the status of an MDBX environment. +.SH OPTIONS +.TP +.BR \-V +Write the library version number to the standard output, and exit. +.TP +.BR \-q +Be quiet. +.TP +.BR \-e +Display information about the database environment. +.TP +.BR \-f +Display information about the environment freelist. +If \fB\-ff\fP is given, summarize each freelist entry. +If \fB\-fff\fP is given, display the full list of page IDs in the freelist. +.TP +.BR \-r +Display information about the environment reader table. +Shows the process ID, thread ID, and transaction ID for each active +reader slot. The process ID and transaction ID are in decimal, the +thread ID is in hexadecimal. The transaction ID is displayed as "-" +if the reader does not currently have a read transaction open. +If \fB\-rr\fP is given, check for stale entries in the reader +table and clear them. The reader table will be printed again +after the check is performed. +.TP +.BR \-a +Display the status of all of the subdatabases in the environment. +.TP +.BR \-s \ subdb +Display the status of a specific subdatabase. +.TP +.BR \-n +Display the status of an MDBX database which does not use subdirectories. +This is legacy option. For now MDBX handles this automatically +for existing databases, but may be required while creating new. + +.SH DIAGNOSTICS +Exit status is zero if no errors occur. +Errors result in a non-zero exit status and +a diagnostic message being written to standard error. +.SH "SEE ALSO" +.BR mdbx_chk (1), +.BR mdbx_copy (1), +.BR mdbx_dump (1), +.BR mdbx_load (1) +.SH AUTHOR +Howard Chu of Symas Corporation <http://www.symas.com>, +Leonid Yuriev <https://github.com/erthink> |