Berkeley DB Reference Guide: Release 3.0: function arguments
Berkeley DB Reference Guide:
Upgrading Berkeley DB Applications
Release 3.0: function arguments
In Berkeley DB 3.0, there are no longer separate structures that
represent each subsystem (e.g., DB_LOCKTAB or DB_TXNMGR), and an overall
DB_ENV environment structure. Instead there is only the
DB_ENV structure. This means that DB_ENV references should
be passed around by your application instead of passing around DB_LOCKTAB
or DB_TXNMGR references.
should have its first argument, a reference to the DB_LOCKTAB structure,
replaced with a reference to the enclosing DB_ENV structure. For
example, the following line of code from a Berkeley DB 2.X application:
DB_LOCKTAB *lt;
DB_LOCK lock;
ret = lock_put(lt, lock);
should now be written as follows:
DB_ENV *dbenv;
DB_LOCK *lock;
ret = lock_put(dbenv, lock);
should have their DB_MPOOL argument replaced with a reference to a
DB_ENV structure.
You should remove all references to DB_LOCKTAB, DB_LOG, DB_MPOOL, and
DB_TXNMGR structures from your application, they are no longer useful
in any way. In fact, a simple way to identify all of the places that
need to be upgraded is to remove all such structures and variables
they declare, and then compile. You will see a warning message from
your compiler in each case that needs to be upgraded.