From: Howard Chu Date: Tue, 16 Aug 2011 21:23:44 +0000 (-0700) Subject: allow silent commit of read-only TXNs X-Git-Tag: OPENLDAP_REL_ENG_2_4_27~148^2~98 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9902a7764e1cefa56a001bde6751e607f14b2702;p=openldap allow silent commit of read-only TXNs --- diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 48e1ebbf6b..b71f1fd0f4 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -778,9 +778,8 @@ mdb_txn_commit(MDB_txn *txn) env = txn->mt_env; if (F_ISSET(txn->mt_flags, MDB_TXN_RDONLY)) { - DPRINTF("attempt to commit read-only transaction"); mdb_txn_abort(txn); - return EPERM; + return MDB_SUCCESS; } if (txn != env->me_txn) {