#include <db.h>

DB_TXN->abort(DB_TXN *tid);  

The DB_TXN->abort() method causes an abnormal termination of the transaction. The log is played backward, and any necessary undo operations are done through the tx_recover function specified to DB_ENV->set_app_dispatch(). Before DB_TXN->abort() returns, any locks held by the transaction will have been released.

In the case of nested transactions, aborting a parent transaction causes all children (unresolved or not) of the parent transaction to be aborted.

All cursors opened within the transaction must be closed before the transaction is aborted.

After DB_TXN->abort() has been called, regardless of its return, the DB_TXN handle may not be accessed again.

The DB_TXN->abort() method returns a non-zero error value on failure and 0 on success.



See Also

Transaction Subsystem and Related Methods