From 9902a7764e1cefa56a001bde6751e607f14b2702 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 16 Aug 2011 14:23:44 -0700 Subject: [PATCH] allow silent commit of read-only TXNs --- libraries/libmdb/mdb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) { -- 2.39.5