###

Berkeley DB Reference Guide:
  Upgrading Berkeley DB Applications

### Release 4.0: db_env_set_XXX

The db_env_set_region_init function was removed in the 4.0 release and replaced with the DB_REGION_INIT flag to the DB_ENV->set_flags method. This is an interface change: historically, the db_env_set_region_init function operated on the entire Berkeley DB library, not a single environment. The new method only operates on a single DB_ENV handle (and any handles created in the scope of that handle). Applications calling the db_env_set_region_init function should update their calls: calls to the historic routine with an argument of 1 (0) are equivalent to calling DB_ENV->set_flags with the DB_REGION_INIT flag and an argument of 1 (0).

The db_env_set_tas_spins function was removed in the 4.0 release and replaced with the DB_ENV->set_tas_spins method. This is an interface change: historically, the db_env_set_tas_spins function operated on the entire Berkeley DB library, not a single environment. The new method only operates on a single DB_ENV handle (and any handles created in the scope of that handle). Applications calling the db_env_set_tas_spins function should update their calls: calls to the historic routine are equivalent to calling DB_ENV->set_tas_spins method with the same argument. In addition, for consistent behavior, all DB_ENV handles opened by the application should make the same configuration call, or the value will need to be entered into the environment's DB_CONFIG file.

Also, three of the standard Berkeley DB debugging interfaces changed in the 4.0 release. It is quite unlikely that Berkeley DB applications use these interfaces.

The DB_ENV->set_mutexlocks method was removed in the 4.0 release and replaced with the DB_NOLOCKING flag to the DB_ENV->set_flags method. Applications calling the DB_ENV->set_mutexlocks method should update their calls: calls to the historic routine with an argument of 1 (0) are equivalent to calling DB_ENV->set_flags with the DB_NOLOCKING flag and an argument of 1 (0).

The db_env_set_pageyield function was removed in the 4.0 release and replaced with the DB_YIELDCPU flag to the DB_ENV->set_flags method. This is an interface change: historically, the db_env_set_pageyield function operated on the entire Berkeley DB library, not a single environment. The new method only operates on a single DB_ENV handle (and any handles created in the scope of that handle). Applications calling the db_env_set_pageyield function should update their calls: calls to the historic routine with an argument of 1 (0) are equivalent to calling DB_ENV->set_flags with the DB_YIELDCPU flag and an argument of 1 (0). In addition, all DB_ENV handles opened by the application will need to make the same call, or the DB_YIELDCPU flag will need to be entered into the environment's DB_CONFIG file.

The db_env_set_panicstate function was removed in the 4.0 release, replaced with the DB_PANIC_ENVIRONMENT and DB_NOPANIC flags to the DB_ENV->set_flags method. (The DB_PANIC_ENVIRONMENT flag will cause an environment to panic, affecting all threads of control using that environment. The DB_NOPANIC flag will cause a single DB_ENV handle to ignore the current panic state of the environment.) This is an interface change: historically the db_env_set_panicstate function operated on the entire Berkeley DB library, not a single environment. Applications calling the db_env_set_panicstate function should update their calls, replacing the historic call with a call to DB_ENV->set_flags and the appropriate flag, depending on their usage of the historic interface.

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