mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 16:54:13 +08:00
mdbx: more NUM_METAS inside mdbx_chk and mdbx_stat.
Change-Id: I93f4fddcff6b038c5a5143e52c7db233e77ec30b
This commit is contained in:
parent
9e473ab6f2
commit
a3ee20e4f6
@ -361,7 +361,7 @@ static int handle_freedb(const uint64_t record_number, const MDBX_val *key,
|
||||
freedb_pages += number;
|
||||
if (envinfo.mi_latter_reader_txnid > txnid)
|
||||
reclaimable_pages += number;
|
||||
for (i = number, prev = 1; --i >= 0;) {
|
||||
for (i = number, prev = NUM_METAS - 1; --i >= 0;) {
|
||||
pg = iptr[i];
|
||||
if (pg < NUM_METAS || pg > envinfo.mi_last_pgno)
|
||||
problem_add("entry", record_number, "wrong idl entry",
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* mdbx_stat.c - memory-mapped database status tool */
|
||||
/* mdbx_stat.c - memory-mapped database status tool */
|
||||
|
||||
/*
|
||||
* Copyright 2015-2017 Leonid Yuriev <leo@yuriev.ru>
|
||||
@ -249,7 +249,7 @@ int main(int argc, char *argv[]) {
|
||||
pgno_t pg, prev;
|
||||
ssize_t i, j, span = 0;
|
||||
j = *iptr++;
|
||||
for (i = j, prev = 1; --i >= 0;) {
|
||||
for (i = j, prev = NUM_METAS - 1; --i >= 0;) {
|
||||
pg = iptr[i];
|
||||
if (pg <= prev)
|
||||
bad = " [bad sequence]";
|
||||
|
Loading…
x
Reference in New Issue
Block a user