mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-20 05:08:21 +08:00
mdbx: zero-length key is not an error for MDBX.
This commit is contained in:
parent
aacd468c05
commit
ab6cc14480
@ -487,9 +487,7 @@ static int process_db(MDB_dbi dbi, char *name, visitor *handler, int silent)
|
|||||||
goto bailout;
|
goto bailout;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key.mv_size == 0) {
|
if (key.mv_size > maxkeysize) {
|
||||||
problem_add("entry", record_count, "key with zero length", NULL);
|
|
||||||
} else if (key.mv_size > maxkeysize) {
|
|
||||||
problem_add("entry", record_count, "key length exceeds max-key-size",
|
problem_add("entry", record_count, "key length exceeds max-key-size",
|
||||||
"%zu > %zu", key.mv_size, maxkeysize);
|
"%zu > %zu", key.mv_size, maxkeysize);
|
||||||
} else if ((flags & MDB_INTEGERKEY)
|
} else if ((flags & MDB_INTEGERKEY)
|
||||||
|
2
mdbx.c
2
mdbx.c
@ -245,8 +245,6 @@ mdb_env_walk(mdb_walk_ctx_t *ctx, const char* dbi, pgno_t pg, int flags, int dee
|
|||||||
}
|
}
|
||||||
|
|
||||||
assert(IS_LEAF(mp));
|
assert(IS_LEAF(mp));
|
||||||
if (node->mn_ksize < 1)
|
|
||||||
return MDB_CORRUPTED;
|
|
||||||
if (node->mn_flags & F_BIGDATA) {
|
if (node->mn_flags & F_BIGDATA) {
|
||||||
MDB_page *omp;
|
MDB_page *omp;
|
||||||
pgno_t *opg;
|
pgno_t *opg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user