Berkeley DB 3.2.9 Change Log

Database On-Disk Format Changes:

  1. The on-disk Queue format has changed from version 2 to version 3. For information on upgrading database formats, see "Upgrading Applications to the 3.2 release" in the Berkeley DB Reference Guide.

Major New Features:

  1. Berkeley DB now includes support for the QNX Neutrino Real-Time Platform.

Interface Additions and Changes:

  1. Add support for blocking on a Queue "consume" operation until a record is available, with a new flag (DB_CONSUME_WAIT) to support this. [#1037]
  2. Change the Queue "consume" operation (and the DB_CONSUME flag) to use the DB->get() method instead of DBC->c_get(). [#1037]
  3. Add support for extent-based queues, and a new method to support them, DB->set_q_extentsize. [#1463]
  4. Add support for wrap-around record numbers in the Queue access method. [#1463]
  5. Add a DB->set_feedback interface flag for database verification operations. [#2019]
  6. Add a reference to a DB object as the first argument to four application callback functions (the callback functions set by DB->set_bt_compare, DB->set_bt_prefix, DB->set_dup_compare, and DB->set_h_hash). [#2179]
  7. Add a DBENV->set_flags interface to support configuration of the database environment. [#2727]
  8. Add the DB_CDB_ALLDB flag to the DBENV->set_flags interface to support Concurrent Data Store semantics across multiple databases in an environment. [#2727]
  9. Remove the app_private field from the DBT structure. Add app_private fields to the DB and DB_ENV structures. [#2862]
  10. The db_env_set_mutexlocks function has become a method on the environment handle, DBENV->set_mutexlocks. [#3001]

General Environment Changes:

  1. Add support for the destruction of mutexes which may hold system resources. [#1953]
  2. Attempts to join existing regions where the application was built with a different version (major, minor, patch) of Berkeley DB than was the application that created the region, now returns EINVAL. [#2198]
  3. Clarify the Berkeley DB documentation that all destructor methods, (e.g., DB->close txn_commit, txn_abort and memp_fclose), always destroy their respective handles, regardless of their return, error or not. Review the appropriate code and apply minor fixes. [#2311]
  4. Fix a bug in which creating multiple databases in one file could fail when using the Concurrent Data Store product. [#2713]
  5. Fix a bug in which running recovery in one environment could cause mutexes to stop working in another environment open in the same process. [#3001]
  6. Fix a set of bugs in which assorted DB interfaces could panic and return errors other than DB_RUNRECOVERY. [#3018]
  7. Fix a bug where calling the DB_ENV->remove method using a handle already passed to the DB_ENV->open method dumped core. [#3097]
  8. Fix a bug where the Concurrent Data Store product could enter deadlock. [#3065]
  9. Fix a bug where recovery output spurious error messages when opening a previously deleted subdatabase. [#3074]

General Access Method Changes:

  1. Fix a bug where the DB->verify method was unable to access subdatabases, returning ENOENT. [#2319]
  2. Change file name processing to not transform database names with leading "./" strings. [#2382]
  3. Fix a bug in which database verification could report the wrong number of pages and fail. [#2559]
  4. Fix a bug in which overflow pages belonging to duplicate data items might not be properly counted by DB->stat. [#2911]
  5. Fix a bug in which cursors could be adjusted incorrectly when items are inserted into an off-page duplicate set. [#2910]
  6. Fix a set of bugs which could cause the DB salvager to dump core when running with DB_AGGRESSIVE or for certain classes of corrupt databases. [#2784]
  7. Fix a bug in which DB_KEYEXIST could be incorrectly returned by DB->verify. [#2784]
  8. Add a stricter verification criterion: free lists of pages are not allowed on metadata pages other than the master one. [#2784]

Btree Access Method Changes:

  1. Fix a bug where cursors in the parent of a nested transaction could be incorrectly adjusted after a child transaction was aborted. [#2373]
  2. Fix a bug where an overflow page's reference count was not decremented during a reverse split. [#2550]
  3. Fix a bug where the tree record count in a Btree could be left incorrect after an aborted insert or delete. [#2810]
  4. Fix a bug in which too high a value of bt_minkey could cause an infinite loop when executing a Btree split. [#2888]
  5. Fix a bug in which overflow pages that stored a duplicate data item could be leaked when the item was deleted. [#2912]

Hash Access Method Changes:

  1. Fix a bug where cursors in the parent of a nested transaction could be incorrectly adjusted after a child transaction was aborted. [#2373]
  2. Fix a bug in which cursor gets performed on deleted items could return EINVAL instead of the correct DB_KEYEMPTY. [#2596]
  3. Fix a bug where the verifier could falsely report errors when new hash pages were allocated in an aborted transaction. [#2577]
  4. Fix a bug where hash recovery roll-forward log contains a abort and then re-do of a hash table double. [#2599]
  5. Fix a bug in hash recovery roll-forward that could cause database corruption. [#2602]
  6. Fix a bug where sizes could be miscalculated when adding duplicate records. [#2611]
  7. Fix a bug in which a Hash insert could result in a misplaced item or an application crash. [#2842]
  8. Fix a memory leak in Hash which could cause salvaging of Hash databases to waste an amount of memory roughly equal to database size. [#2869]
  9. Fix a bug in which a failed attempt to put a duplicate duplicate item could result in a corrupted database. [#2996]
  10. Fix a bug in which databases upgraded from version 2.X could become corrupted by the upgrade process. [#3061]
  11. Fix a bug in which verifying a Hash database with the DB_ORDERCHKONLY flag could fail. [#3061]

Queue Access Method Changes:

  1. Fix a bug in which a (possibly nonsense) record number was returned when a queue insertion failed. [#2634]
  2. Add support for circular queues: when UINT32_T_MAX records have been added using DB_APPEND, wrap around to record number 1. [#2829]
  3. Fix a bug where the DB->stat method incorrectly marked the metadata page clean. [#3092]

Recno Access Method Changes:

  1. Fix a bug where cursors in the parent of a nested transaction could be incorrectly adjusted after a child transaction was aborted. [#2373,#2490]
  2. Fix a bug in which a failure during the open of a Recno database could result in application crashes. [#2687]
  3. Change the Recno statistics to not count logically deleted data items in Recno trees with immutable record numbers. [#2629]
  4. Fix a bug in which overflow pages in Recno databases might not be properly counted by DB->stat. [#2911]
  5. Change the Recno backing source file implementation to use stdio and not memory map the files. [#3076]
  6. Fix a bug where writing new records past the end of the source text file when the entire file hadn't been read failed. [#3276]

C++ API Changes:

  1. Fix a bug where calling the Db::remove() method could crash the application. [#2665]
  2. Stop supporting "reopens" of Db/DbEnv objects in C++, fix API memory leaks. [#2783, #2344]

Java API Changes:

  1. Java now supports the Db->set_bt_compare, Db->set_bt_prefix Db->set_h_hash and DbEnv->set_tx_recover methods, allowing Java applications to specify alternate Btree comparison and prefix methods, Hash hashing method and application-specific recovery. [#2179]
  2. Remove unnecessary local allocation routine setting in Java API. [#2510]
  3. Fix a bug where the Db.DB_CACHED_COUNTS flag was not properly defined in Java. [#2568]
  4. Fix a bug where certain DB error returns did not display the correct db_strerror text. [#2679]
  5. Db.rename, Db.remove, DbEnv.remove now throw java.io.FileNotFoundException. [#2320]
  6. Stop supporting "reopens" of Db/DbEnv objects in Java, fix API memory leaks. [#2320]

Tcl API Changes:

  1. Fix a bug where closing a Tcl environment handle (when the environment included open database handles), the open database handles would be discarded and the underlying Berkeley DB resources leaked. [#2325]

RPC Client/Server Changes:

None.

XA Resource Manager Changes:

  1. Fix a bug in which updates could be performed on behalf of the wrong XA transaction. [#2650]

Locking Subsystem Changes:

  1. Change the locking subsystem to guarantee that if any request for a lock fails, the off field is set to LOCK_INVALID, parts of Berkeley DB reasonably depend on this, and it fixes a potential uninitialized memory read in Btree root page processing. [#2364]

Logging Subsystem Changes:

  1. Fix a bug where an error message was written out if the log_get() interface was called and the supplied DBT included the DB_USERMEM flag, and there was insufficient space available for the log record. [#2243]

Buffer Pool Subsystem Changes:

  1. Avoid flushing the log for each buffer written during a transaction checkpoint. [#2287]
  2. Fix a bug in which the "gbytes" parameter to the set_cachesize functions (and to set_cachesize directives in a DB_CONFIG file) was handled incorrectly. [#2685]
  3. Fix a bug which could result in erratic behavior or application crashes during buffer pool open. [#2747]
  4. Fix a bug in which statistics fields belonging to per-file structures were not returned when per-file statistics were not requested. [#3038]

Transaction Subsystem Changes:

  1. Rework child transaction structures on child commit in order to decrease transaction resource usage and ensure abort on error. [#2230] [#2489]
  2. Display an error message if cursors opened within a transaction are still open at transaction commit/abort. [#2235]
  3. Fix a bug where one abort path after a page allocation could lead to a corrupted free list. [#2464]
  4. Fix bug that caused reference to potentially freed memory. [#2478]
  5. Fix a bug in which recovery of the deletion of a file that had been later recreated with the same name could fail. [#2538]
  6. Fix a bug where missing pages were handled incorrectly during overflow reference count recover. [#2556]
  7. Fix a bug where recovery of a subdatabase metadata operation could fail. [#2502]
  8. Change transaction checkpointing to render less likely a situation in which no checkpoint will ever complete because pages remain pinned. [#2569]
  9. Fix a bug where recovery of a queue metadata operation could fail. [#2690]
  10. Fix a bug where recovery of a DB_CONSUME operation in queue could fail. [#2698]
  11. Fix a bug where recovery could fail if done twice without an intervening checkpoint after an unclean shutdown. [#2918]
  12. Fix a bug where an error on recovery could cause a core dump due to an incorrect number of arguments in a printf statement. [#2987]
  13. Change transaction checkpointing so that checkpoints are no longer skipped if there are new log records in the log buffer but none which have been flushed to disk. [#2949]

Utility Changes:

  1. Fix a bug in which db_stat would print extraneous error messages when opening a file containing multiple databases. [#2565]
  2. Fix a bug where db_dump would display keys as numeric strings even though data items were being displayed as hex pairs. [#2676]
  3. Fix a bug where the wrong statistics value was displayed for the maximum locks ever requested. [#2979]
  4. Remove mention of the "-a m" option to db_deadlock, it was never implemented. [#3082]

Configuration, Documentation, Portability and Build Changes:

  1. Support for MSVC 4 has been removed.
  2. Add a --enable-umrw configuration option to mask harmless uninitialized memory reads/writes. [#2377]
  3. Remove searching of non-standard directories for Tcl installation, search only /usr/local. [#2386]
  4. Fix a bug where Win32 support did not accept colon as a device/path separator. [#2393]
  5. Ensure that Tcl directory include files do not override Berkeley DB include files when building the Tcl API. [#2395]
  6. Rename "try" variable something else for Compaq Tru64 UNIX 5.0a. [#2410]
  7. Change the Reference Guide to list page name, not section name as the HTML title. [#2485]
  8. Fix a bug where the DBT documentation incorrectly said that various flags were only used during key/data pair retrieval. [#2537]
  9. Fix a bug where VxWorks applications were restricted to the use of one environment, and add support for DB_ENV->set_shm_key on VxWorks. [#2528]
  10. Fix a bug where VxWorks applications incorrectly failed when trying to memory-map read-only database files. [#2570]
  11. Add support in the MSVC project files to build statically on Windows. [#2554]
  12. Fix a bug in which resolution of absolute pathnames in VxWorks was incorrect. [#2579]
  13. Fix a bug in which file initialization was being incorrectly performed for temporary files that have not yet been physically instantiated on Windows/95 and /98. [#2341]
  14. Enable large file support in Linux. [#2871]
  15. Fix a compiler warning in the Solaris mutex code. [#2905]
  16. Berkeley DB now works with the Cygwin tools. You need at least DLL version 1.1.4. Configure and build as you would on a Unix system. Only static library builds are supported, no shared library support is included. [#2913]
  17. Update BSD-style queue.h macros to avoid compilation problems on some versions of FreeBSD. [#2999]
  18. Modify installation sequence such that the db_185.h header file is now only installed when --enable-compat185 was specified as an option to configure. [#3064]