Berkeley DB 3.1.14 Change Log
Database On-Disk Format Changes:
- 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:
- Berkeley DB now includes support for VxWorks systems.
- 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]
- New cursor method, DBcursor->c_count, that returns the number of
duplicate items associated with the referenced key. [#303]
- Berkeley DB now includes a RPC-based client/server implementation. [#426]
- Recovery to a specified time is supported. [#855]
- New cursor method, DB->verify, that supports database verification
and salvage. [#588, #827, #1156]
- Add a Berkeley DB method to rename databases. [#1492]
- Significantly increased verbose error output for debugging support. [#1866]
Interface Additions and Changes:
- All of the Berkeley DB utilities now support the -V option to display
the library version.
- 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.
- Add a private field to the DBT structure, enabling applications to
pass private information into the Btree/Hash comparison/hashing functions.
- 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]
- 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]
- Modify the DB->put interface, when using the DB_APPEND flag, to
support DBT conventions. [#1523]
- Add DB_NODUPDATA option to the DB->put and DBcursor->c_put
methods to disallow duplicate duplicates. [#1866]
- 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]
- Move application-wide configuration interfaces from DbEnv method
set to static function interfaces. [#2245]
General Environment Changes:
- 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.
- Take two checkpoints after recovery completes so that on next recovery
no work needs to be redone. [#1316]
- Fix a bug where, if DIAGNOSTIC was #defined, recovery could incorrectly
assert that no files should be open and drop core. [#1316]
- Fix a bug where recovering from deleting a page in a database could
cause other operations to not be rolled-forward. [#1532]
- Fix a bug where HP-UX msemaphore semaphores could cause mutex races
on HP-UX 10.XX. [#2199]
General Access Method Changes:
- Add support for zero-length keys. [#625]
- Fix a bug where join cursors were not automatically closed when the
primary DB handle was closed. [#1325]
- 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]
- 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]
- Fix a bug where creating a subdatabase ignored the specification of
a non-standard page size. [#1422]
- Fix a bug where join cursors didn't correctly support DB_DBT_XXX
flags. [#1639]
- Fix bugs in join cursor handling of DBTs, and associated memory leaks.
[#1777, #1929, #1940]
- Change error return for duplicate duplicates from EINVAL to
DB_KEYEXIST. [#1866]
- Fix a bug where DB handles opened in threaded environments were not
themselves automatically threaded. [#1943]
- Fix a bug where the DB->remove method could leak memory. [#2066]
Btree Access Method Changes:
- Increase the accuracy of the returned statistics count for Btree key
and data items.
- Fix a bug where the next page in the leaf page chain might not be
updated during recovery. [#1320]
- Fix a bug where Btrees supporting retrieval by record number could
become corrupted for some data sets. [#1663]
- Fix a bug where Btrees supporting retrieval by record number could
have incorrect record counts after reverse splits. [#1688]
- Fix a bug where keys stored as overflow items could be incorrectly
compared. [#1994]
Hash Access Method Changes:
- Fix a bug where partial puts in the hash access method could lead to
heap corruption. [#1300]
- 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:
- Fix a bug where an invalid lock was acquired when duplicating a cursor
in Concurrent Data Store.
- Fix a bug where EAGAIN could be returned instead of DB_LOCK_DEADLOCK.
[#1354]
- Fix a bug where the Queue Access Method could drop core if a put
operation failed. [#1449]
- Fix a bug where user requests for non-blocking locks were ignored. [#1970]
Recno Access Method Changes:
None.
C++ API Changes:
- Fix a large number of warnings and portability problems for various
C++ compilers.
- Add "void" type to operator = in all examples for portability.
- Fix a bug where the DB_CXX_NO_EXCEPTIONS in the Db constructor was
causing immediate failure of the call. [#1350]
- 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]
- Fix a bug where Db::remove and Db::upgrade were specified 'static'. [#1469]
- Fix a bug where memory freed during open/close was written to in the
destructor. [#1889]
- Fix a bug where Db::close and DbEnv::close and their associated
destructors interacted wrongly. [#1998]
Java API Changes:
- 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]
- 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]
- Fix a bug where Java could fail to run on Solaris due to memory
allocation issues with shared libraries. [#1384]
- Rewrite the Java API in C for portability reasons (it was previously
implemented in C++). [#1384]
Tcl API Changes:
- The -mpool option to the berkdb env command is now the default.
- The -txn option to the berkdb env command now implies the -lock and -log
options.
RPC Client/Server Changes:
None.
XA Resource Manager Changes:
- Fix a bug where returned XID fields (currently unused by Tuxedo) were
being incorrectly zeroed. [#1840]
Locking Subsystem Changes:
- Lock objects with waiters are now separately threaded to make deadlock
detection faster. [#1983]
- Fix a bug where locks could be leaked if the DB_LOCK_NOWAIT flag was
specified and the lock was already held. [#2072]
- Add a count of the lock requests that failed because DB_LOCK_NOWAIT
was set to the lock region statistics. [#2072]
Logging Subsystem Changes:
- Fix a bug where logging print routines displayed file IDs as unsigned
values instead of signed values.
- Change the Windows/NT release to no longer pre-allocate logfiles.
[#849, #1780]
- 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]
- 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]
- Fix a bug where free'd memory could be accessed in an error path. [#2053]
Buffer Pool Subsystem Changes:
- Fix a bug where Berkeley DB could fail when too many databases were
created in an environment. [#1528]
Transaction Subsystem Changes:
- Fix a number of bugs in DB file registration that could cause problems
if files were repeatedly opened and closed. [#1943]
- 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]
- Fix a bug where an unthreaded DB handle could be incorrectly used in
a threaded environment, during recovery. [#2033]
Utility Changes:
- Convert the supporting utilities to use common code for signal
and process-ID log file handling. [#1596]
Configuration, Documentation, Portability and Build Changes:
- Upgrade to the current Perl BerkeleyDB and DB_File modules.
- 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.
- Upgrade to current versions of libtool (1.3.4), autoconf and the
config scripts.
- Update the test suite to no longer require a large set of UNIX
utilities to run.
- Convert to CVS/RCS source repository and file revision Ids.
- Include Windows 2000 support.
- Support systems without strtoul(3) support. [#1337]
- 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]
- Fix a bug where AIX wouldn't compile because there was no MUTEX_INIT
macro for the test-and-set mutexes. [#1354]
- Fix a bug where Berkeley DB incorrectly aligned memory from the shared
memory regions for gcc on the UltraSparc. [#1395, #1404]
- 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]
- 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]
- Call GetTempDir() to determine system's temp directory on Windows. [#1478]
- 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]
- Fix a bug where DB would fail to compile on AIX because of a missing
MUTEX_INIT definition. [#1561]
- Fix a bug where out-of-memory condition when scanning a directory failed
to close the directory. [#1872]
- Remove all use of signal functions. [#1964]
- 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]
- 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]