Commit a3f33dd2 authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

Fix mdb_open() off-by-one error in maxdbs check

parent 38fb8e6e
......@@ -6548,7 +6548,7 @@ int mdb_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *dbi)
}
/* If no free slot and max hit, fail */
if (!unused && txn->mt_numdbs >= txn->mt_env->me_maxdbs - 1)
if (!unused && txn->mt_numdbs >= txn->mt_env->me_maxdbs)
return MDB_DBS_FULL;
/* Find the DB info */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment