###

Berkeley DB Reference Guide:
  Upgrading Berkeley DB Applications

# Release 4.0: db_env_set_XXX

The db_env_set_region_init interface was removed in the 4.0 release and replaced with the DB_REGION_INIT flag to the DB_ENV->set_flags interface. This is an interface change: historically, the db_env_set_region_init interface operated on the entire Berkeley DB library, not a single environment. The new interface 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 interface 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 interface was removed in the 4.0 release and replaced with the DB_ENV->set_tas_spins function. This is an interface change: historically, the db_env_set_tas_spins interface operated on the entire Berkeley DB library, not a single environment. The new interface 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 interface should update their calls: calls to the historic routine are equivalent to calling DB_ENV->set_tas_spins function 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 interface was removed in the 4.0 release and replaced with the DB_NOLOCKING flag to the DB_ENV->set_flags interface. Applications calling the DB_ENV->set_mutexlocks interface 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 interface was removed in the 4.0 release and replaced with the DB_YIELDCPU flag to the DB_ENV->set_flags interface. This is an interface change: historically, the db_env_set_pageyield interface operated on the entire Berkeley DB library, not a single environment. The new interface 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 interface 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 interface was removed in the 4.0 release, replaced with the DB_PANIC_ENVIRONMENT and DB_NOPANIC flags to the DB_ENV->set_flags interface. (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 interface operated on the entire Berkeley DB library, not a single environment. Applications calling the db_env_set_panicstate interface 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 Sleepycat Software