lmdb: fix mdb_chk for case MainDB's records isn't a sub-db.

Change-Id: I3a4ae1f50972fde6edab828b58199dde9b84550c
This commit is contained in:
Leo Yuriev
2015-05-08 23:57:01 +03:00
parent f2703156f0
commit bd05dd24ab
3 changed files with 4 additions and 4 deletions

2
mdb.c
View File

@@ -9410,7 +9410,7 @@ int mdb_dbi_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *db
/* make sure this is actually a DB */
MDB_node *node = NODEPTR(mc.mc_pg[mc.mc_top], mc.mc_ki[mc.mc_top]);
if (!(node->mn_flags & F_SUBDATA))
return MDB_INCOMPATIBLE;
return MDB_BAD_DBI;
} else if (rc == MDB_NOTFOUND && (flags & MDB_CREATE)) {
/* Create if requested */
data.mv_size = sizeof(MDB_db);