]> git.sur5r.net Git - openldap/commitdiff
allow silent commit of read-only TXNs
authorHoward Chu <hyc@symas.com>
Tue, 16 Aug 2011 21:23:44 +0000 (14:23 -0700)
committerHoward Chu <hyc@symas.com>
Thu, 1 Sep 2011 23:31:10 +0000 (16:31 -0700)
libraries/libmdb/mdb.c

index 48e1ebbf6b5586ccb3131b3384fbba93656af750..b71f1fd0f4b862ad7891cb14d988770cfdeb2fa6 100644 (file)
@@ -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) {