lmdb: Use last page (off-by-one error).

Change-Id: Ie1fd90d1562ab8ea8e53701188e3a17495a697e1
This commit is contained in:
Leo Yuriev 2015-01-03 23:07:06 +03:00
parent 1b5de44e23
commit 1b8398b413

2
mdb.c
View File

@ -2116,7 +2116,7 @@ mdb_page_alloc(MDB_cursor *mc, int num, MDB_page **mp)
/* Use new pages from the map when nothing suitable in the freeDB */
i = 0;
pgno = txn->mt_next_pgno;
if (pgno + num >= env->me_maxpg) {
if (pgno + num > env->me_maxpg) {
DPUTS("DB size maxed out");
rc = MDB_MAP_FULL;
goto fail;