Library Version 18.1.40

txn_XXX
Prev | Chapter 10. Upgrading Berkeley DB 3.3 applications to Berkeley DB 4.0 | Next

## txn_XXX

The C API for the Berkeley DB Transaction subsystem was reworked in the 4.0 release as follows:

Historic functional interface | Berkeley DB 4.X method
--- | ---
txn_abort | DB_TXN->abort()
txn_begin | DB_ENV->txn_begin()
txn_checkpoint | DB_ENV->txn_checkpoint()
txn_commit | DB_TXN->commit()
txn_discard | DB_TXN->discard()
txn_id | DB_TXN->id()
txn_prepare | DB_TXN->prepare()
txn_recover | DB_TXN->recover()
txn_stat | DB_TXN->stat()

Applications calling any of these functions should update their calls to use the enclosing DB_ENV class handle's method (easily done as the first argument to the existing call is the correct handle to use).

As a special case, since applications might potentially have many calls to the txn_abort, txn_begin and txn_commit functions, those functions continue to work unchanged in the Berkeley DB 4.0 release.

In addition, the DB_TXN->stat() call has been changed in the 4.0 release to take a flags argument. To leave their historic behavior unchanged, applications should add a final argument of 0 to any calls made to DB_TXN->stat().

Prev | Up | Next
memp_XXX | Home | db_env_set_XXX