mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 18:24:12 +08:00
lmdb: check multi-value ordering in mdb_chk.
Change-Id: Ie4e1b0f795fa84c96a4f505cece14607a95e7c9e
This commit is contained in:
parent
b60f510355
commit
e2127a6e57
@ -334,8 +334,8 @@ static long process_db(MDB_dbi dbi, char *name, visitor *handler, int silent)
|
|||||||
if (! flags)
|
if (! flags)
|
||||||
print(" none");
|
print(" none");
|
||||||
else {
|
else {
|
||||||
if (flags & MDB_DUPSORT)
|
/* if (flags & MDB_DUPSORT)
|
||||||
print(" duplicates");
|
print(" duplicates"); */
|
||||||
for (i=0; dbflags[i].bit; i++)
|
for (i=0; dbflags[i].bit; i++)
|
||||||
if (flags & dbflags[i].bit)
|
if (flags & dbflags[i].bit)
|
||||||
print(" %s", dbflags[i].name);
|
print(" %s", dbflags[i].name);
|
||||||
@ -388,6 +388,11 @@ static long process_db(MDB_dbi dbi, char *name, visitor *handler, int silent)
|
|||||||
++dups;
|
++dups;
|
||||||
if (! (flags & MDB_DUPSORT))
|
if (! (flags & MDB_DUPSORT))
|
||||||
problem_add(record_count, "duplicated entries", NULL);
|
problem_add(record_count, "duplicated entries", NULL);
|
||||||
|
else if (flags & MDB_INTEGERDUP) {
|
||||||
|
cmp = mdb_dcmp(txn, dbi, &prev_data, &data);
|
||||||
|
if (cmp > 0)
|
||||||
|
problem_add(record_count, "broken ordering of multi-values", NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (flags & MDB_INTEGERKEY)
|
if (flags & MDB_INTEGERKEY)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user