### Berkeley DB 2.4.14 Change Log

### Interface Changes Introduced in DB 2.4.14:

1. Enhance the db_load(1) utility so that the default behavior is to add data to existing databases (rather than to always create the database), and to correctly perform locking for databases running in Berkeley DB environments. This allows the use of db_load(1) to add key/data pairs to existing, active databases.

   Add a -n option to the db_load(1) This option causes db_load(1) to refuse to overwrite already existing key/data pairs in databases.

2. Enhance the db_stat(1) utility to display additional information about the shared memory buffer pool and lock regions. The new options are -C[Acflmo] for the lock region, and -M[Ahlm] for the shared memory buffer pool region. This information is normally intended only for Berkeley DB performance tuning.

   Add a -N option to the db_stat(1) This option keeps db_stat(1) from acquiring region locks when reading shared regions, which allows db_stat(1) to be used to display information about regions where applications have crashed while holding region locks.

   Add region reference counts and sizes to all db_stat(1) region displays.

3. Add a new flag, DB_MUTEXLOCKS to the db_value_set(1) interface. This flag causes requests for mutual exclusion mutexes to be immediately granted without test. This flag is only intended for debugging purposes.

### B+tree Access Method Bug Fixes:

1. Fix bug in the B+tree access method where additional cursors could be incorrectly updated when key/data pairs were added or deleted.

2. Fix bug where an aborted transaction during a B+tree split could cause pages to be left pinned.

3. Fix possible core dump when freeing the (cursor referenced) last item in the last page in a duplicate chain.

4. Fix possible core dump when deleting overflow items from duplicate pages.

5. Fix bug where duplicate page splits could result in database corruption (common to both B+tree and Hash Access Methods).

### Hash Access Method Bug Fixes:

1. Fix bug where Hash access method recovery did not always correctly recover key/data pair addition or deletion.

2. Fix bug where deleting a key in a Hash access method database could cause a cursor sequentially walking the database to skip records.

3. Fix bug where duplicate page splits could result in database corruption (common to both B+tree and Hash Access Methods).

### Shared Memory Buffer Pool Bug Fixes:

1. Fix bug where a DB thread handle could be left locked if a read-only file descriptor could not be upgraded to read-write during a buffer pool sync to disk.

### Common Shared Region Support Bug Fixes:

1. Fix bug where private shared memory pool regions could not be created on architectures without spinlock mutex support.

2. Fix possible file descriptor leak on HP/UX architecture (reports #150, #158).

3. Fix a variety of inconsistencies where, after a failed attempt to open shared regions, the code recovery paths were incorrect.

### Additional Bug Fixes:

1. Fix possible core dump in lock_open(1) when it was called without first creating a Berkeley DB database environment.

### Test Suite, Example Program and Build Procedure Bug Fixes and Changes:

1. Fix build procedures for a number of architectures: affected systems include VC++ 5.0 and various releases of SunOS, AIX, OSF/1, FreeBSD and Linux (reports #145, #156).

2. Fix the Berkeley DB test suite to correctly identify Windows systems in all cases (the previous method failed for some releases of the Tcl scripting language).

3. Fix the ex_thread example program to correctly set the buffer cache size.

4. Fix the Berkeley DB test suite to ignore errors where System V shared memory interfaces (shmget(2)) have not been configured correctly.

5. Add support for the BSD/OS 4.0 release.

6. Add support for the SCO OpenServer Release 5 (3.2.2). (The test suite has not yet run successfully on this architecture, although we currently believe that the problems are in the test suite, and not in the Berkeley DB library itself.)

7. Change configuration to ignore the FreeBSD shmget(2) interfaces when ftok(3) is not available from the C library.

8. Change configuration to fail on the Nextstep architecture. (Previously, Berkeley DB would configure successfully, but then not build on Nextstep.)

### Additional Changes:

1. Return EINVAL if the DB_RECOVER or DB_RECOVER_FATAL flags were specified to db_appinit(3) without also specifying the DB_INIT_TXN flag.

2. Removed "Additional Change" #7 from the Berkeley DB 2.4.10 release:

   > The mutex locking code has been enhanced to no longer attempt full test-and-set instructions unless there is a strong probability of acquiring the mutex. This makes spinning on the mutex significantly less expensive.

   Full test-and-set instructions are necessary on some architectures, and it this change actually decreased performance in some cases.