allow silent commit of read-only TXNs

vmware
Howard Chu 13 years ago
parent 9860d5a43f
commit 9902a7764e
  1. 3
      libraries/libmdb/mdb.c

@ -778,9 +778,8 @@ mdb_txn_commit(MDB_txn *txn)
env = txn->mt_env; env = txn->mt_env;
if (F_ISSET(txn->mt_flags, MDB_TXN_RDONLY)) { if (F_ISSET(txn->mt_flags, MDB_TXN_RDONLY)) {
DPRINTF("attempt to commit read-only transaction");
mdb_txn_abort(txn); mdb_txn_abort(txn);
return EPERM; return MDB_SUCCESS;
} }
if (txn != env->me_txn) { if (txn != env->me_txn) {

Loading…
Cancel
Save