mirror of
https://github.com/isar/libmdbx.git
synced 2025-08-25 09:44:27 +08:00
lmdb: Use last page (off-by-one error).
Change-Id: Ie1fd90d1562ab8ea8e53701188e3a17495a697e1
This commit is contained in:
2
mdb.c
2
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;
|
||||
|
Reference in New Issue
Block a user