From: Howard Chu Date: Wed, 9 Jul 2014 04:31:48 +0000 (-0700) Subject: ITS#7825 more X-Git-Tag: OPENLDAP_REL_ENG_2_4_40~126^2~12 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=276aa559698ff3eca42bc855237296c29efad4fd;p=openldap ITS#7825 more only update dbiseq in dbi_open on write txns --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index c920149611..0520eb72d5 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -8893,7 +8893,9 @@ int mdb_dbi_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *db txn->mt_dbxs[slot].md_name.mv_size = len; txn->mt_dbxs[slot].md_rel = NULL; txn->mt_dbflags[slot] = dbflag; - txn->mt_dbiseqs[slot] = ++txn->mt_env->me_dbiseqs[slot]; + /* read txns don't track sequence numbers */ + if (!(txn->mt_flags & MDB_TXN_RDONLY)) + txn->mt_dbiseqs[slot] = ++txn->mt_env->me_dbiseqs[slot]; memcpy(&txn->mt_dbs[slot], data.mv_data, sizeof(MDB_db)); *dbi = slot; mdb_default_cmp(txn, slot);