Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
789c71c4
Commit
789c71c4
authored
Jul 31, 2017
by
Howard Chu
Browse files
ITS#8704 Add MDB_PREVMETA support to tools
parent
d12ebb65
Changes
6
Hide whitespace changes
Inline
Side-by-side
libraries/liblmdb/mdb_copy.1
View file @
789c71c4
.TH MDB_COPY 1 "201
4
/07/
0
1" "LMDB 0.9.
14
"
.TH MDB_COPY 1 "201
7
/07/
3
1" "LMDB 0.9.
90
"
.\" Copyright 2012-2017 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.SH NAME
...
...
@@ -11,6 +11,8 @@ mdb_copy \- LMDB environment copy tool
.BR \-c ]
[\c
.BR \-n ]
[\c
.BR \-v ]
.B srcpath
[\c
.BR dstpath ]
...
...
@@ -40,6 +42,10 @@ Currently it fails if the environment has suffered a page leak.
.TP
.BR \-n
Open LDMB environment(s) which do not use subdirectories.
.TP
.BR \-v
Use the previous environment state instead of the latest state.
This may be useful if the latest state has been corrupted.
.SH DIAGNOSTICS
Exit status is zero if no errors occur.
...
...
libraries/liblmdb/mdb_copy.c
View file @
789c71c4
...
...
@@ -38,6 +38,8 @@ int main(int argc,char * argv[])
for
(;
argc
>
1
&&
argv
[
1
][
0
]
==
'-'
;
argc
--
,
argv
++
)
{
if
(
argv
[
1
][
1
]
==
'n'
&&
argv
[
1
][
2
]
==
'\0'
)
flags
|=
MDB_NOSUBDIR
;
else
if
(
argv
[
1
][
1
]
==
'v'
&&
argv
[
1
][
2
]
==
'\0'
)
flags
|=
MDB_PREVMETA
;
else
if
(
argv
[
1
][
1
]
==
'c'
&&
argv
[
1
][
2
]
==
'\0'
)
cpflags
|=
MDB_CP_COMPACT
;
else
if
(
argv
[
1
][
1
]
==
'V'
&&
argv
[
1
][
2
]
==
'\0'
)
{
...
...
@@ -48,7 +50,7 @@ int main(int argc,char * argv[])
}
if
(
argc
<
2
||
argc
>
3
)
{
fprintf
(
stderr
,
"usage: %s [-V] [-c] [-n] srcpath [dstpath]
\n
"
,
progname
);
fprintf
(
stderr
,
"usage: %s [-V] [-c] [-n]
[-v]
srcpath [dstpath]
\n
"
,
progname
);
exit
(
EXIT_FAILURE
);
}
...
...
libraries/liblmdb/mdb_dump.1
View file @
789c71c4
.TH MDB_DUMP 1 "201
5
/0
9
/3
0
" "LMDB 0.9.
17
"
.TH MDB_DUMP 1 "201
7
/0
7
/3
1
" "LMDB 0.9.
90
"
.\" Copyright 2014-2017 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.SH NAME
...
...
@@ -14,6 +14,8 @@ mdb_dump \- LMDB environment export tool
[\c
.BR \-n ]
[\c
.BR \-v ]
[\c
.BR \-p ]
[\c
.BR \-a \ |
...
...
@@ -42,6 +44,10 @@ names will be listed, no data will be output.
.BR \-n
Dump an LMDB database which does not use subdirectories.
.TP
.BR \-v
Use the previous environment state instead of the latest state.
This may be useful if the latest state has been corrupted.
.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
...
...
libraries/liblmdb/mdb_dump.c
View file @
789c71c4
...
...
@@ -151,7 +151,7 @@ static int dumpit(MDB_txn *txn, MDB_dbi dbi, char *name)
static
void
usage
(
char
*
prog
)
{
fprintf
(
stderr
,
"usage: %s [-V] [-f output] [-l] [-n] [-p] [-a|-s subdb] dbpath
\n
"
,
prog
);
fprintf
(
stderr
,
"usage: %s [-V] [-f output] [-l] [-n] [-p]
[-v]
[-a|-s subdb] dbpath
\n
"
,
prog
);
exit
(
EXIT_FAILURE
);
}
...
...
@@ -175,6 +175,7 @@ int main(int argc, char *argv[])
* -n: use NOSUBDIR flag on env_open
* -p: use printable characters
* -f: write to file instead of stdout
* -v: use previous metapage
* -V: print version and exit
* (default) dump only the main DB
*/
...
...
@@ -202,6 +203,9 @@ int main(int argc, char *argv[])
case
'n'
:
envflags
|=
MDB_NOSUBDIR
;
break
;
case
'v'
:
envflags
|=
MDB_PREVMETA
;
break
;
case
'p'
:
mode
|=
PRINT
;
break
;
...
...
libraries/liblmdb/mdb_stat.1
View file @
789c71c4
.TH MDB_STAT 1 "201
5
/0
9
/3
0
" "LMDB 0.9.
17
"
.TH MDB_STAT 1 "201
7
/0
7
/3
1
" "LMDB 0.9.
90
"
.\" Copyright 2012-2017 Howard Chu, Symas Corp. All Rights Reserved.
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.SH NAME
...
...
@@ -14,6 +14,8 @@ mdb_stat \- LMDB environment status tool
[\c
.BR \-n ]
[\c
.BR \-v ]
[\c
.BR \-r [ r ]]
[\c
.BR \-a \ |
...
...
@@ -39,6 +41,10 @@ If \fB\-fff\fP is given, display the full list of page IDs in the freelist.
.BR \-n
Display the status of an LMDB database which does not use subdirectories.
.TP
.BR \-v
Use the previous environment state instead of the latest state.
This may be useful if the latest state has been corrupted.
.TP
.BR \-r
Display information about the environment reader table.
Shows the process ID, thread ID, and transaction ID for each active
...
...
libraries/liblmdb/mdb_stat.c
View file @
789c71c4
...
...
@@ -34,7 +34,7 @@ static void prstat(MDB_stat *ms)
static
void
usage
(
char
*
prog
)
{
fprintf
(
stderr
,
"usage: %s [-V] [-n] [-e] [-r[r]] [-f[f[f]]] [-a|-s subdb] dbpath
\n
"
,
prog
);
fprintf
(
stderr
,
"usage: %s [-V] [-n] [-e] [-r[r]] [-f[f[f]]]
[-v]
[-a|-s subdb] dbpath
\n
"
,
prog
);
exit
(
EXIT_FAILURE
);
}
...
...
@@ -61,6 +61,7 @@ int main(int argc, char *argv[])
* -f: print freelist info
* -r: print reader info
* -n: use NOSUBDIR flag on env_open
* -v: use previous metapage
* -V: print version and exit
* (default) print stat of only the main DB
*/
...
...
@@ -84,6 +85,9 @@ int main(int argc, char *argv[])
case
'n'
:
envflags
|=
MDB_NOSUBDIR
;
break
;
case
'v'
:
envflags
|=
MDB_PREVMETA
;
break
;
case
'r'
:
rdrinfo
++
;
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment