Berkeley DB Reference Guide:
Upgrading Berkeley DB Applications

PrevRefNext

Release 4.0: txn_XXX

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

Historic functional interfaceBerkeley DB 4.X method
txn_abortDB_TXN->abort
txn_beginDB_ENV->txn_begin
txn_checkpointDB_ENV->txn_checkpoint
txn_commitDB_TXN->commit
txn_discardDB_TXN->discard
txn_idDB_TXN->id
txn_prepareDB_TXN->prepare
txn_recoverDB_ENV->txn_recover
txn_statDB_ENV->txn_stat

Applications calling any of these functions should update their calls to use the enclosing DB_ENV or DB_TXN 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_ENV->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_ENV->txn_stat.


PrevRefNext

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.