From 1b8398b413acdd6e923db2f22c5278bd3be1b1f5 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Sat, 3 Jan 2015 23:07:06 +0300 Subject: [PATCH] lmdb: Use last page (off-by-one error). Change-Id: Ie1fd90d1562ab8ea8e53701188e3a17495a697e1 --- mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdb.c b/mdb.c index a85f15e1..a2d71dfc 100644 --- a/mdb.c +++ b/mdb.c @@ -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;