mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 01:44:13 +08:00
mdbx: return MDBX_RESULT_TRUE
on empty transaction commit.
This commit is contained in:
parent
548d0a50b8
commit
405de05ca9
@ -10390,8 +10390,15 @@ int mdbx_txn_commit_ex(MDBX_txn *txn, MDBX_commit_latency *latency) {
|
||||
(txn->mt_flags & (MDBX_TXN_DIRTY | MDBX_TXN_SPILLS)) == 0) {
|
||||
for (int i = txn->mt_numdbs; --i >= 0;)
|
||||
mdbx_tassert(txn, (txn->mt_dbistate[i] & DBI_DIRTY) == 0);
|
||||
rc = MDBX_SUCCESS;
|
||||
#if defined(MDBX_NOSUCCESS_EMPTY_COMMIT) && MDBX_NOSUCCESS_EMPTY_COMMIT
|
||||
rc = mdbx_txn_end(txn, end_mode);
|
||||
if (unlikely(rc != MDBX_SUCCESS))
|
||||
goto fail;
|
||||
rc = MDBX_RESULT_TRUE;
|
||||
goto provide_latency;
|
||||
#else
|
||||
goto done;
|
||||
#endif /* MDBX_NOSUCCESS_EMPTY_COMMIT */
|
||||
}
|
||||
|
||||
mdbx_debug("committing txn %" PRIaTXN " %p on mdbenv %p, root page %" PRIaPGNO
|
||||
|
Loading…
x
Reference in New Issue
Block a user