From: Howard Chu Date: Wed, 9 Jul 2014 13:17:54 +0000 (-0700) Subject: Revert "ITS#7789 update RESIZED errmsg text" X-Git-Tag: OPENLDAP_REL_ENG_2_4_40~126^2~9 X-Git-Url: https://git.sur5r.net/?p=openldap;a=commitdiff_plain;h=a5e4eecb1e59e9645113bb4c63d06a23a2c4bdf9 Revert "ITS#7789 update RESIZED errmsg text" This reverts commit d8e18551c3f03d5205f4dc8d1711e494d3814b17. And partially reverts mapsize check. Only mapsize increases are relevant. --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 96e37bcbb8..d6ad1142b1 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -1248,7 +1248,7 @@ static char *const mdb_errstr[] = { "MDB_TXN_FULL: Transaction has too many dirty pages - transaction too big", "MDB_CURSOR_FULL: Internal error - cursor stack limit reached", "MDB_PAGE_FULL: Internal error - page has no more space", - "MDB_MAP_RESIZED: Environment mapsize was changed by another process", + "MDB_MAP_RESIZED: Database contents grew beyond environment mapsize", "MDB_INCOMPATIBLE: Operation and DB incompatible, or DB flags changed", "MDB_BAD_RSLOT: Invalid reuse of reader locktable slot", "MDB_BAD_TXN: Transaction cannot recover - it must be aborted", @@ -2503,9 +2503,9 @@ mdb_txn_renew0(MDB_txn *txn) } txn->mt_dbflags[0] = txn->mt_dbflags[1] = DB_VALID; - /* If we didn't ask for a resize, but the size changed, fail */ + /* If we didn't ask for a resize, but the size grew, fail */ if (!(env->me_flags & MDB_RESIZING) - && env->me_mapsize != meta->mm_mapsize) { + && env->me_mapsize < meta->mm_mapsize) { mdb_txn_reset0(txn, "renew0-mapfail"); if (new_notls) { txn->mt_u.reader->mr_pid = 0;