mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 01:04:13 +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)
|
||||
print(" none");
|
||||
else {
|
||||
if (flags & MDB_DUPSORT)
|
||||
print(" duplicates");
|
||||
/* if (flags & MDB_DUPSORT)
|
||||
print(" duplicates"); */
|
||||
for (i=0; dbflags[i].bit; i++)
|
||||
if (flags & dbflags[i].bit)
|
||||
print(" %s", dbflags[i].name);
|
||||
@ -388,6 +388,11 @@ static long process_db(MDB_dbi dbi, char *name, visitor *handler, int silent)
|
||||
++dups;
|
||||
if (! (flags & MDB_DUPSORT))
|
||||
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 {
|
||||
if (flags & MDB_INTEGERKEY)
|
||||
|
Loading…
x
Reference in New Issue
Block a user