Function lmdb_master_sys::mdb_txn_commit

source ·
pub unsafe extern "C" fn mdb_txn_commit(txn: *mut MDB_txn) -> c_int
Expand description

Commit all the operations of a transaction into the database.

The transaction handle is freed. It and its cursors must not be used again after this call, except with #mdb_cursor_renew().

Note: Earlier documentation incorrectly said all cursors would be freed. Only write-transactions free cursors.

§Arguments

  • txn (direction in) - A transaction handle returned by #mdb_txn_begin()

§Returns

A non-zero error value on failure and 0 on success. Some possible errors are:

  • EINVAL - an invalid parameter was specified.
  • ENOSPC - no more disk space.
  • EIO - a low-level I/O error occurred while writing.
  • ENOMEM - out of memory.