mdbx: more NUM_METAS inside mdbx_chk and mdbx_stat.

Change-Id: I93f4fddcff6b038c5a5143e52c7db233e77ec30b
This commit is contained in:
Leo Yuriev 2017-07-24 08:53:28 +03:00
parent 9e473ab6f2
commit a3ee20e4f6
2 changed files with 3 additions and 3 deletions

View File

@ -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",

View File

@ -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]";