allow silent commit of read-only TXNs

This commit is contained in:
Howard Chu 2011-08-16 14:23:44 -07:00
parent 9860d5a43f
commit 9902a7764e

View 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) {