mdbx: don't close DBI-handles from R/O txn_abort().

This is related to:
 - https://github.com/ReOpen/ReOpenLDAP/issues/119 (its6794 regression test may fail)
 - https://github.com/ReOpen/ReOpenLDAP/issues/92 (rare test060-mt-hot failures)
This commit is contained in:
Leo Yuriev 2017-02-15 20:54:58 +03:00
parent 2b924524ec
commit f75fa27fe6

6
mdb.c
View File

@ -3256,6 +3256,12 @@ mdb_txn_abort(MDB_txn *txn)
if(unlikely(txn->mt_signature != MDBX_MT_SIGNATURE))
return MDB_VERSION_MISMATCH;
#if MDBX_MODE_ENABLED
if (F_ISSET(txn->mt_flags, MDB_TXN_RDONLY))
/* LY: don't close DBI-handles in MDBX mode */
return mdb_txn_end(txn, MDB_END_UPDATE|MDB_END_SLOT|MDB_END_FREE);
#endif /* MDBX_MODE_ENABLED */
if (txn->mt_child)
mdb_txn_abort(txn->mt_child);