mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-30 22:47:16 +08:00
mdbx-tools: minor refine mdbx_chk.
Change-Id: I71db479944a305f03019d985b91a39cd51ba9981
This commit is contained in:
parent
aa1c609c28
commit
acc6969594
@ -94,7 +94,7 @@ MDBX_stat envstat;
|
|||||||
size_t maxkeysize, userdb_count, skipped_subdb;
|
size_t maxkeysize, userdb_count, skipped_subdb;
|
||||||
uint64_t reclaimable_pages, gc_pages, alloc_pages, unused_pages, backed_pages;
|
uint64_t reclaimable_pages, gc_pages, alloc_pages, unused_pages, backed_pages;
|
||||||
unsigned verbose;
|
unsigned verbose;
|
||||||
char ignore_wrong_order, quiet;
|
bool ignore_wrong_order, quiet;
|
||||||
const char *only_subdb;
|
const char *only_subdb;
|
||||||
|
|
||||||
struct problem {
|
struct problem {
|
||||||
@ -747,7 +747,7 @@ static void usage(char *prog) {
|
|||||||
" -n\t\tNOSUBDIR mode for open\n"
|
" -n\t\tNOSUBDIR mode for open\n"
|
||||||
" -q\t\tbe quiet\n"
|
" -q\t\tbe quiet\n"
|
||||||
" -w\t\tlock DB for writing while checking\n"
|
" -w\t\tlock DB for writing while checking\n"
|
||||||
" -d\t\tdisable page-by-page traversal of b-tree\n"
|
" -d\t\tdisable page-by-page traversal of B-tree\n"
|
||||||
" -s subdb\tprocess a specific subdatabase only\n"
|
" -s subdb\tprocess a specific subdatabase only\n"
|
||||||
" -c\t\tforce cooperative mode (don't try exclusive)\n"
|
" -c\t\tforce cooperative mode (don't try exclusive)\n"
|
||||||
" -i\t\tignore wrong order errors (for custom comparators case)\n",
|
" -i\t\tignore wrong order errors (for custom comparators case)\n",
|
||||||
@ -909,7 +909,7 @@ int main(int argc, char *argv[]) {
|
|||||||
char *prog = argv[0];
|
char *prog = argv[0];
|
||||||
char *envname;
|
char *envname;
|
||||||
int problems_maindb = 0, problems_freedb = 0, problems_meta = 0;
|
int problems_maindb = 0, problems_freedb = 0, problems_meta = 0;
|
||||||
int dont_traversal = 0;
|
bool dont_traversal = false;
|
||||||
bool locked = false;
|
bool locked = false;
|
||||||
|
|
||||||
double elapsed;
|
double elapsed;
|
||||||
@ -953,7 +953,7 @@ int main(int argc, char *argv[]) {
|
|||||||
verbose++;
|
verbose++;
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
quiet = 1;
|
quiet = true;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
envflags |= MDBX_NOSUBDIR;
|
envflags |= MDBX_NOSUBDIR;
|
||||||
@ -965,7 +965,7 @@ int main(int argc, char *argv[]) {
|
|||||||
envflags &= ~MDBX_EXCLUSIVE;
|
envflags &= ~MDBX_EXCLUSIVE;
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
dont_traversal = 1;
|
dont_traversal = true;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
if (only_subdb && strcmp(only_subdb, optarg))
|
if (only_subdb && strcmp(only_subdb, optarg))
|
||||||
@ -973,7 +973,7 @@ int main(int argc, char *argv[]) {
|
|||||||
only_subdb = optarg;
|
only_subdb = optarg;
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
ignore_wrong_order = 1;
|
ignore_wrong_order = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
usage(prog);
|
usage(prog);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user