mdbx: zero-length key is not an error for MDBX.

This commit is contained in:
Leo Yuriev 2017-01-27 19:30:55 +03:00
parent aacd468c05
commit ab6cc14480
2 changed files with 1 additions and 5 deletions

View File

@ -487,9 +487,7 @@ static int process_db(MDB_dbi dbi, char *name, visitor *handler, int silent)
goto bailout;
}
if (key.mv_size == 0) {
problem_add("entry", record_count, "key with zero length", NULL);
} else if (key.mv_size > maxkeysize) {
if (key.mv_size > maxkeysize) {
problem_add("entry", record_count, "key length exceeds max-key-size",
"%zu > %zu", key.mv_size, maxkeysize);
} else if ((flags & MDB_INTEGERKEY)

2
mdbx.c
View File

@ -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));
if (node->mn_ksize < 1)
return MDB_CORRUPTED;
if (node->mn_flags & F_BIGDATA) {
MDB_page *omp;
pgno_t *opg;