The Berkeley DB Package: DB 3.1.14 Change Log
Description: Berkeley DB: A database programmatic toolkit.
Keywords: embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods

### Berkeley DB 3.1.14 Change Log

### Database On-Disk Format Changes:

1. The on-disk Btree/Recno format has changed from version 7 to version 8, and the on-disk Hash format has changed from version 6 to version 7. For information on upgrading database formats, see "Upgrading Applications to the 3.1 release" in the Berkeley DB Reference Guide for more information.

### Major New Features:

1. Berkeley DB now includes support for VxWorks systems.
2. Off-page duplicates now stored in an on-disk B+tree structure, greatly speeding searches in sorted duplicate sets. In addition, a count of duplicate items is now maintained for all duplicate sets, providing better optimization of logical joins. [#303]
3. New cursor method, DBcursor->c_count, that returns the number of duplicate items associated with the referenced key. [#303]
4. Berkeley DB now includes a RPC-based client/server implementation. [#426]
5. Recovery to a specified time is supported. [#855]
6. New cursor method, DB->verify, that supports database verification and salvage. [#588, #827, #1156]
7. Add a Berkeley DB method to rename databases. [#1492]
8. Significantly increased verbose error output for debugging support. [#1866]

### Interface Additions and Changes:

1. All of the Berkeley DB utilities now support the -V option to display the library version.
2. It is now possible to set almost all the Berkeley DB environment configuration options in the environment's DB_CONFIG file. There are new DB_ENV handle methods for setting the database directory, logging directory and temporary file directory. These were previously set using the DB_DATA_DIR, DB_LOG_DIR and DB_TMP_DIR strings in the config argument to the DB_ENV->open and DB_ENV->remove methods. As part of this change, the config argument to the DB_ENV->open and DB_ENV->remove methods has been removed in favor of the new methods.
3. Add a private field to the DBT structure, enabling applications to pass private information into the Btree/Hash comparison/hashing functions.
4. Change the redo parameter of the function passed to the DBENV->set_tx_recover interface used to be an integer set to any one of a number of #defined values. The redo parameter has been replaced by the op parameter, an enumerated type. [#606]
5. Add support for a new DBcursor->c_get flags, DB_NEXT_NODUP (DB_PREV_NODUP), which return the next (previous) key/data pair where the data item is not a duplicate of the current key. [#887, #1985]
6. Modify the DB->put interface, when using the DB_APPEND flag, to support DBT conventions. [#1523]
7. Add DB_NODUPDATA option to the DB->put and DBcursor->c_put methods to disallow duplicate duplicates. [#1866]
8. Add a fast return of approximate row counts for all access methods, add separate key and data statistics for the Hash access method. Regularize the naming scheme for all statistics. [#1978]
9. Move application-wide configuration interfaces from DbEnv method set to static function interfaces. [#2245]

### General Environment Changes:

1. It is now possible to build and run Berkeley DB on systems that do not have either of the mmap(2) or shmget(2) interfaces.
2. Take two checkpoints after recovery completes so that on next recovery no work needs to be redone. [#1316]
3. Fix a bug where, if DIAGNOSTIC was #defined, recovery could incorrectly assert that no files should be open and drop core. [#1316]
4. Fix a bug where recovering from deleting a page in a database could cause other operations to not be rolled-forward. [#1532]
5. Fix a bug where HP-UX msemaphore semaphores could cause mutex races on HP-UX 10.XX. [#2199]

### General Access Method Changes:

1. Add support for zero-length keys. [#625]
2. Fix a bug where join cursors were not automatically closed when the primary DB handle was closed. [#1325]
3. Fix a bug where the DB->remove method of an entire database would create a backup file even if the application wasn't running with transactions; the backup files were never removed. [#1357]
4. Fix a bug where when adding a new page in a chain of duplicates the LSN of a page could be unnecessarily updated, confusing recovery. [#1412]
5. Fix a bug where creating a subdatabase ignored the specification of a non-standard page size. [#1422]
6. Fix a bug where join cursors didn't correctly support DB_DBT_XXX flags. [#1639]
7. Fix bugs in join cursor handling of DBTs, and associated memory leaks. [#1777, #1929, #1940]
8. Change error return for duplicate duplicates from EINVAL to DB_KEYEXIST. [#1866]
9. Fix a bug where DB handles opened in threaded environments were not themselves automatically threaded. [#1943]
10. Fix a bug where the DB->remove method could leak memory. [#2066]

### Btree Access Method Changes:

1. Increase the accuracy of the returned statistics count for Btree key and data items.
2. Fix a bug where the next page in the leaf page chain might not be updated during recovery. [#1320]
3. Fix a bug where Btrees supporting retrieval by record number could become corrupted for some data sets. [#1663]
4. Fix a bug where Btrees supporting retrieval by record number could have incorrect record counts after reverse splits. [#1688]
5. Fix a bug where keys stored as overflow items could be incorrectly compared. [#1994]

### Hash Access Method Changes:

1. Fix a bug where partial puts in the hash access method could lead to heap corruption. [#1300]
2. Fix a bug where duplicate data items were not correctly identified during logging and could be incorrectly restored during recovery. [#1377]

### Queue Access Method Changes:

1. Fix a bug where an invalid lock was acquired when duplicating a cursor in Concurrent Data Store.
2. Fix a bug where EAGAIN could be returned instead of DB_LOCK_DEADLOCK. [#1354]
3. Fix a bug where the Queue Access Method could drop core if a put operation failed. [#1449]
4. Fix a bug where user requests for non-blocking locks were ignored. [#1970]

### Recno Access Method Changes:

> None.

### C++ API Changes:

1. Fix a large number of warnings and portability problems for various C++ compilers.
2. Add "void" type to operator = in all examples for portability.
3. Fix a bug where the DB_CXX_NO_EXCEPTIONS in the Db constructor was causing immediate failure of the call. [#1350]
4. Fix problems with disposing of Db and DbEnv objects: the underlying DB, DB_ENV objects were looked at after a close(), which is illegal, since the memory is freed. And in the case where Db::Db() is called with a NULL DbEnv, we create our own DbEnv object, and this was not being deleted on close(). [#1466, #1467, #1468]
5. Fix a bug where Db::remove and Db::upgrade were specified 'static'. [#1469]
6. Fix a bug where memory freed during open/close was written to in the destructor. [#1889]
7. Fix a bug where Db::close and DbEnv::close and their associated destructors interacted wrongly. [#1998]

### Java API Changes:

1. Fix a bug where, when building with versions 1.1.* of the JDK, an explicit reference for the CLASSPATH prevented compilation from within MS Visual studio. [#1334]
2. Avoid using true/false as they aren't recognized by older C++ systems (in this case, SPARC Solaris 2.6 with Sun Workshop 4.2). [#1384]
3. Fix a bug where Java could fail to run on Solaris due to memory allocation issues with shared libraries. [#1384]
4. Rewrite the Java API in C for portability reasons (it was previously implemented in C++). [#1384]

### Tcl API Changes:

1. The -mpool option to the berkdb env command is now the default.
2. The -txn option to the berkdb env command now implies the -lock and -log options.

### RPC Client/Server Changes:

> None.

### XA Resource Manager Changes:

1. Fix a bug where returned XID fields (currently unused by Tuxedo) were being incorrectly zeroed. [#1840]

### Locking Subsystem Changes:

1. Lock objects with waiters are now separately threaded to make deadlock detection faster. [#1983]
2. Fix a bug where locks could be leaked if the DB_LOCK_NOWAIT flag was specified and the lock was already held. [#2072]
3. Add a count of the lock requests that failed because DB_LOCK_NOWAIT was set to the lock region statistics. [#2072]

### Logging Subsystem Changes:

1. Fix a bug where logging print routines displayed file IDs as unsigned values instead of signed values.
2. Change the Windows/NT release to no longer pre-allocate logfiles. [#849, #1780]
3. Fix a bug where if you attempt to do catastrophic recovery on a log that spans a crash you can get errors of the form "open: invalid argument". [#1365]
4. Fix a bug where the DB_ARCH_LOG flag to the log_archive interface could fail to return the correct set of log filenames. [#1426]
5. Fix a bug where free'd memory could be accessed in an error path. [#2053]

### Buffer Pool Subsystem Changes:

1. Fix a bug where Berkeley DB could fail when too many databases were created in an environment. [#1528]

### Transaction Subsystem Changes:

1. Fix a number of bugs in DB file registration that could cause problems if files were repeatedly opened and closed. [#1943]
2. Remove all requirements that applications flush the log before closing the environment to ensure that no additional work needs to be done during recovery. [#2006]
3. Fix a bug where an unthreaded DB handle could be incorrectly used in a threaded environment, during recovery. [#2033]

### Utility Changes:

1. Convert the supporting utilities to use common code for signal and process-ID log file handling. [#1596]

### Configuration, Documentation, Portability and Build Changes:

1. Upgrade to the current Perl BerkeleyDB and DB_File modules.
2. Upgrade to the current Scriptics Tcl release (8.3), add the --with-tcl option to automatically use the tclConfig.sh information to correctly compile the Tcl API and test suite.
3. Upgrade to current versions of libtool (1.3.4), autoconf and the config scripts.
4. Update the test suite to no longer require a large set of UNIX utilities to run.
5. Convert to CVS/RCS source repository and file revision Ids.
6. Include Windows 2000 support.
7. Support systems without strtoul(3) support. [#1337]
8. Fix a bug where the DB 1.85 API interface was incorrectly named, so configuration scripts wouldn't find "dbopen" and applications wouldn't load. [#1345]
9. Fix a bug where AIX wouldn't compile because there was no MUTEX_INIT macro for the test-and-set mutexes. [#1354]
10. Fix a bug where Berkeley DB incorrectly aligned memory from the shared memory regions for gcc on the UltraSparc. [#1395, #1404]
11. Fix a bug where DB did not correctly build on the Siemens Nixdorf Reliant Unix because the initspin() function was expected to return an int. [#1418]
12. Fix a bug where DB would fail on HP-UX, apparently the HP-UX C library contains pread/pwrite symbols, but they don't work. [#1459]
13. Call GetTempDir() to determine system's temp directory on Windows. [#1478]
14. Fix a case where large buffers could be allocated on the stack when running on Windows, leading to stack resource starvation in multithreaded programs. [#1530]
15. Fix a bug where DB would fail to compile on AIX because of a missing MUTEX_INIT definition. [#1561]
16. Fix a bug where out-of-memory condition when scanning a directory failed to close the directory. [#1872]
17. Remove all use of signal functions. [#1964]
18. Fix a bug where the POSIX fcntl system call would be called even after the underlying Berkeley DB open call had been replaced by the application. [#2114]
19. Fix a bug where the standard free routine was still called when finishing a directory scan, even after the application had replaced the underlying OS functionality. [#2115]