1<!--$Id: 4.1.24.html,v 1.6 2007/05/17 18:17:18 bostic Exp $--> 2<html> 3<head> 4<title>The Berkeley DB Package: DB 4.1.24 and 4.1.25 Change Log</title> 5<meta name="description" content="Berkeley DB: A database programmatic toolkit."> 6<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods"> 7</head> 8<body bgcolor=white> 9 10<h3 align=center>Berkeley DB 4.1.24 and 4.1.25 Change Log</h3> 11 12<h3>Database or Log File On-Disk Format Changes:</h3> 13<ol> 14 15<li>All of the access method database formats changed in the Berkeley 16DB 4.1 release (Btree/Recno: version 8 to version 9, Hash: version 7 17to version 8, and Queue: version 3 to version 4). <b>The format changes 18are entirely backward-compatible, and no database upgrades are 19needed.</b> 20 21</ol> 22<h3>Major New Features:</h3> 23<ol> 24 25<li>Berkeley DB now includes support for database encryption using the AES 26encryption standard. [#1797] 27<li>Berkeley DB now includes support for database page checksums to 28allow detection of database corruption during I/O. [#1797] 29<li>The shared memory buffer pool code base was substantially reworked 30in the 4.1 release to improve concurrent throughput. [#4655] 31 32</ol> 33<h3>General Environment Changes:</h3> 34<ol> 35 36<li>Allow applications to specify transaction handles to the 37DB->open method call, so database creation can be grouped 38with other Berkeley DB calls in a single transaction. [#4257] 39<li>Add the DB_ENV->remove and DB_ENV->rename method calls that support 40transactional protection of database removal and renaming. [#4257] 41<li>Add the DB_ENV->set_flags flags DB_DIRECT_DB and DB_DIRECT_LOG, 42which disable the system's buffer cache where possible. [#4526] 43<li>Unlock the pthread mutex if pthread_cond_wait() returns an error. [#4872] 44<li>Fix a memory leak caused by running recovery. [#4913] 45<li>Fix a bug in which closing an environment with open database 46handles could result in application crashes. [#4991] 47<li>Fix a bug where DB_CONFIG files were ignored if the database 48environment defaulted to the application's current working directory. [#5265] 49<li>Fix a bug where transaction abort or commit could fail to destroy 50the handle. [#5633] 51<li>Fix a set of bugs where the Berkeley DB API could return DB_RUNRECOVERY 52without panic-ing the database environment itself or calling the application's 53panic-callback function. [#5743] 54<li>Fix a bug in where DB=>rename and DB->remove method calls 55could leak a transaction and its locks. [#5824] 56<li>Fix a bug where recovery feedback could return values greater than 57100. [#6193] 58<li>Fix a bug where a page allocated by a transaction, eventually aborted 59because of application or system failure, could appear twice in the free 60list, if catastrophic recovery was performed. [#6222] 61<li>Add a new flag, DB_AUTO_COMMIT, that wraps all database modification 62operations inside a transaction, to the DB_ENV->set_flags method. [#6395] 63<li>Fix a bug where recovery could fail when upgrading between releases. 64[#6372] 65<li>Fix a recovery bug where pages that were repeatedly freed and 66allocated could be lost. [#6479] [#6501] 67<li>Change DB_CONFIG reading to handle non-<newline> terminated 68last line. [#6490] 69 70</ol> 71<h3>General Access Method Changes:</h3> 72<ol> 73 74<li>Allow applications to specify transaction handles to the 75DB->associate method call, so secondary index creation can be grouped 76with other Berkeley DB calls in a single transaction. [#4185] 77<li>Add a new flag, DB_AUTO_COMMIT, that wraps single database 78operations inside a transaction. This flag is supported by the 79DB->del, DB->open, DB->put, DB->truncate,DB_ENV->remove, 80and DB_ENV->rename methods. [#4257] 81<li>The DB_EXCL DB->open method flag has been enhanced to 82work on subdatabases. [#4257] 83<li>Fix a bug in which a DB->put(DB_APPEND) could result in leaked 84memory or a corruption in the returned record number. [#5002] 85<li>Fix a bug in the database salvage code that could 86leave pages pinned in the cache. [#5037] 87<li>Add a flag to the DB->verify method to output salvaged 88key/data pairs in printable characters. [#5037] 89<li>Fix a bug in which DB->verify() might continue and report extraneous 90database corruption after a fatal error. [#5131] 91<li>Fix a bug where calling the DB->stat method before the DB->open 92method could drop core. [#5190] 93<li>Fix a bug in which a DB->get, DBcursor->c_get, or 94DBcursor->c_pget on a secondary index, in the Concurrent Data Store 95product, could result in a deadlock. [#5192] 96<li>Fix a bug in which DB->verify() could correctly report errors but 97still return success. [#5297] 98<li>Add support for the DB->set_cache_priority interface, that allows 99applications to set the underlying cache priority for their database 100files. [#5375] 101<li>Fix a bug where calling DBcursor->c_pget with a database that is 102not a secondary index would drop core. [#5391] 103<li>Fix a bug where a bug in the DB->truncate method could cause recovery 104to fail. [#5679] 105<li>Fix a bug where DB_GET_RECNO would fail if specified to a secondary 106index. [#5811] 107<li>Fix a bug where building a secondary index for an existing primary 108database could fail in Concurrent Data Store environments. [#5811] 109<li>Fix a bug where the DB->rename method could fail, causing a 110problem during recovery. [#5893] 111<li>Fix a bug in which a DB->get or DB->pget call on a secondary 112index could fail when done with a handle shared among multiple threads. 113[#5899] 114<li>Fix a bug in which a DB->put operation on a database with 115off-page duplicates could leak a duplicate cursor, thereby preventing 116transactions being able to commit. [#5936] 117<li>Fix a bug where overflow page reference counts were not properly 118maintained when databases were truncated. [#6168] 119<li>Fix a bug where the bulk get APIs could allocate large amounts of 120heap memory. [#6439] [#6520] 121 122</ol> 123<h3>Btree Access Method Changes:</h3> 124<ol> 125 126<li>Fix a bug that prevented loads of sorted data, with duplicates 127at the end of the tree, from creating compact trees. [#4926] 128<li>No longer return a copy of the key if the DB_GET_BOTH or 129DB_GET_BOTH_RANGE flags are specified. [#4470] 130<li>Fix a bug where the fast-search code could hold an unlocked reference 131to a page, which could lead to recovery failure. [#5518] 132<li>Fix a bug where some cursor operations on a database, for which the 133bt_minkey size had been specified, could fail to use the correct overflow 134key/data item size. [#6183] 135<li>Fix a bug where the recovery of an aborted transaction that did a 136reverse Btree split might leave a page in an inconsistent state. [#6393] 137 138</ol> 139<h3>Hash Access Method Changes:</h3> 140<ol> 141 142<li>Fix bugs that could cause hash recovery to drop core. [#4978] 143<li>Use access method flags instead of interface flags to check for 144read-only access to a hash database with an application-specified hash 145function. [#5121] 146<li>Fix a bug where a hash database allocation of a new set of buckets 147may be improperly recovered by catastrophic recovery if the transaction 148is split across log files and the beginning segment of the transaction 149is not included in the set of logs to be recovered. [#5942] 150<li>Fix a bug where aborting particular hash allocations could lead to 151a database on which the verifier would loop infinitely. [#5966] 152<li>Fix a bug where a memory allocation failure could result in a system 153hang. [#5988] 154<li>Remove nelem from the Hash access method statistics (the value was 155incorrect once items had been added or removed from the database). [#6101] 156<li>Fix a bug where a page allocated by an aborted transaction might 157not be placed on the free list by recovery, if the file holding the page 158was created as part of recovery, and a later page was part of a hash 159bucket allocation. [#6184] 160<li>Fix a bug where allocated pages could be improperly recovered on 161systems that require explicit zero-ing of filesystem pages. [#6534] 162 163</ol> 164<h3>Queue Access Method Changes:</h3> 165<ol> 166 167<li>No longer return a copy of the key if the DB_SET_RANGE flag 168is specified. [#4470] 169<li>Fix a bug where DBcursor->c_get (with DB_MULTIPLE or DB_MULTIPLE_KEY 170specified) could fail on a Queue database if the record numbers had wrapped. 171[#6397] 172 173</ol> 174<h3>Recno Access Method Changes:</h3> 175<ol> 176 177<li>No longer return a copy of the key if the DB_GET_BOTH or 178DB_GET_BOTH_RANGE flags are specified. [#4470] 179<li>Fix a bug where non-transactional locking applications could leak 180locks when modifying Recno databases. [#5766] 181<li>Fix a bug where DBcursor->c_get with the DB_GET_RECNO flag would 182panic the environment if the cursor was uninitialized. [#5935] 183<li>Fix a bug where deleting pages from a three-level Recno tree could 184cause the database environment to panic. [#6232] 185 186</ol> 187<h3>C++-specific API Changes:</h3> 188<ol> 189 190<li>C++ DbLock::put is replaced by DbEnv::lock_put to match the 191C and Java API change in Release 4.0. [#5170] 192<li>Declared destructors and methods within Db and DbEnv classes to be 193virtual, making subclassing safer. [#5264] 194<li>Fixed a bug where Dbt objects with no flags set would not be filled 195with data by some operations. [#5706] 196<li>Added DbDeadlockException, DbRunRecoveryException, and 197DbLockNotGrantedException classes to C++, and throw them accordingly. [#6134] 198<li>Added C++ methods to support remaining conversions between C++ 199classes and C structs where appropriate. In particular, DbTxn/DB_TXN 200conversions and DbMpoolFile/DB_MPOOLFILE were added. [#6278] 201<li>Fix a bug in DbEnv::~DbEnv() that could cause memory corruption if 202a DbEnv was deleted without being closed. [#6342] 203<li>Reordered C++ class declarations to avoid a GCC g++ warning about 204function inlining. [#6406] 205<li>Fix a bug in the DbEnv destructor that could cause memory corruption 206when an environment was destroyed without closing first. [#6342] 207<li>Change DbEnv and Db destructor behavior to close the handle if it 208was not already closed. [#6342] 209 210</ol> 211<h3>Java-specific API Changes:</h3> 212<ol> 213 214<li>Added check for system property "sleepycat.Berkeley DB.libfile" that 215can be used to specify a complete pathname for the JNI shared library. 216This is needed as a workaround on Mac OS X, where libtool cannot 217currently create a library with a .jnilib extension which is what the 218current JDK expects by default. [#5664] 219<li>Fixed handling of JVM out of memory conditions, when some JNI 220methods return NULL. When the JVM runs out of memory, calls should 221consistently fail with OutOfMemoryErrors. [#5995] 222<li>Added Dbt.get_object and Dbt.set_object convenience routines to the 223Java API to make using serialization easier. [#6113] 224<li>Fixed a bug that prevented Java's Db.set_feedback from working, 225fixed document for Java's Db.set_feedback, some callback methods were 226misnamed. [#6137] 227<li>Fix a NullPointerException in Db.finalize() if the database had been 228closed. [#6504] 229<li>Marked DbEnv constructor with "throws DbException". [#6342] 230 231</ol> 232<h3>Tcl-specific API Changes:</h3> 233 234None. 235 236<h3>RPC-specific Client/Server Changes:</h3> 237<ol> 238 239<li>Fix a bug where Db and DbEnv handles were not thread-safe. [#6102] 240 241</ol> 242<h3>Replication Changes:</h3> 243<ol> 244 245<li>A large number of replication bugs were fixed in this release. 246The replication support is now believed to be production quality. 247<li>Add the DB_ENV->set_rep_limit interface, allowing applications 248to limit the data sent in response to a single DB_ENV->rep_process_message 249call. [#5999] 250<li>Add the DB_ENV->set_rep_stat interface, returning information 251from the replication subsystem [#5919] 252 253</ol> 254<h3>XA Resource Manager Changes:</h3> 255<ol> 256 257<li>Added support for multithreaded XA. Environments can now have 258multiple XA transactions active. db_env_xa_attach() can be used to get 259a DB_TXN that corresponds to the XA transaction in the current thread. 260[#5049] 261<li>Added a com.sleepycat.Berkeley DB.xa package that implements J2EE 262support for XA. This includes new DbXAResource, DbXid classes that 263implement the XAResource and Xid interfaces. [#5049] 264<li>Fix a bug where aborting a prepared transaction after recovery may 265fail. [#6383] 266<li>Fix a bug where recovery might fail if a prepared transaction had 267previously extended the size of a file and then was aborted. [#6387] 268<li>Fix a bug where if the commit of a prepared transaction fails the 269transaction would be aborted. [#6389] 270 271</ol> 272<h3>Locking Subsystem Changes:</h3> 273<ol> 274 275<li>Fix a bug where lock counts were incorrect if a lock request 276returned DB_LOCK_NOTGRANTED or an error occurred. [#4923] 277<li>Fix a bug where lock downgrades were counted as releases, so the 278lock release statistics could be wrong. [#5762] 279<li>Fix a bug where the lock and transaction timeout values could not 280be reset by threads of control joining Berkeley DB database 281environments. [#5996] 282<li>Fix a bug where applications using lock and/or transaction timeouts 283could hit a race condition that would lead to a segmentation fault. [#6061] 284 285</ol> 286<h3>Logging Subsystem Changes:</h3> 287<ol> 288 289<li>DB_ENV->log_register and DB_ENV->log_unregister have been 290removed from the interface. [#0046] 291<li>Fix a bug where creating a database environment with a nonexistent 292logging directory could drop core. [#5833] 293<li>Add support allowing applications to change the log file size in 294existing database environments. [#4875] 295<li>Fix a bug where a write error on a log record spanning a buffer 296could cause transaction abort to fail and the database environment to 297panic. [#5830] 298 299</ol> 300 301<h3>Memory Pool Subsystem Changes:</h3> 302<ol> 303 304<li>The DB_INCOMPLETE error has been removed, as cache flushing can no 305longer return without completing. [#4655] 306<li>Fix a bug where Berkeley DB might refuse to open a file if the open 307was attempted while another thread was writing a large buffer. [#4885] 308<li>Prefer clean buffers to dirty buffers when selecting a buffer for 309eviction. [#4934] 310<li>Fix a bug where transaction checkpoint might miss flushing a buffer 311to disk. [#5033] 312<li>Fix a bug where Berkeley DB applications could run out of file 313descriptors. [#5535] 314<li>Fix bugs where Berkeley DB could self-deadlock on systems requiring 315mutex resource reclamation after application failure. [#5722] [#6523] 316 317</ol> 318<h3>Transaction Subsystem Changes:</h3> 319<ol> 320 321<li>Go back only one checkpoint, not two, when performing normal 322recovery. [#4284] 323<li>Fix a bug where an abort of a transaction could fail if there was no 324disk space for the log. [#5740] 325<li>Fix a bug where the checkpoint log-sequence-number could reference 326a nonexistent log record. [#5789] 327<li>Fix a bug where subtransactions which allocated pages from the 328filesystem and subsequently aborted could cause other pages allocated 329by sibling transactions to not be freed if the parent transaction then 330aborted. [#5903] 331<li>Fix a bug where transactions doing multiple updates to a queue 332database which spanned a checkpoint could be improperly handled by 333recovery. [#5898] 334 335</ol> 336<h3>Utility Changes:</h3> 337<ol> 338 339<li>Fix a bug where the -p option could not be specified with 340the -R or -r options. [#5037] 341<li>The utilities were modified to correctly size their private caches 342in order to handle databases with large page sizes. [#5055] 343<li>Fix a bug in which utilities run with the -N option would fail to 344ignore the environment's panic flag. [#5082] 345<li>Fix a bug where invalid log records could cause db_printlog to drop 346core. [#5173] 347<li>Add a new option to the db_verify utility to support verification 348of files that include databases having non-standard sorting or 349hash functions. [#5237] 350 351</ol> 352<h3>Configuration, Documentation, Portability and Build Changes:</h3> 353<ol> 354 355<li>Replace test-and-set mutexes on Windows with a new mutex 356implementation that signals an event to wake blocked threads. [#4413] 357<li>Support configuration of POSIX pthread mutexes on systems 358where the pthread mutexes do not support inter-process locks. [#4942] 359<li>Add mutex support for the ARM architecture using the gcc 360compiler. [#5018] 361<li>On Windows NT/2000/XP, switched to atomic seek-and-read/write 362operations to improve performance of concurrent reads [#0654]. 363<li>Support cross-compilation using the GNU compiler tool chain. [#4558] 364<li>Fix a bug where libraries were always installed read-only. [#5096] 365<li>Fix a bug where temporary files on VxWorks could fail. [#5160] 366<li>Fix a bug where Berkeley DB did not install correctly if the system 367cp utility did not support the -f option. [#5111] 368<li>Correct the documentation for the Queue access method statistics 369field qs_cur_recno to be the "Next available record number". [#5190] 370<li>Fix a bug where file rename could fail on Windows/9X. [#5223] 371<li>Removed support for Microsoft Visual Studio 5.0 [#5231] 372<li>Switched to using HANDLEs for all I/O operations on Windows to 373overcome a hard limit of 2048 open file descriptors in Microsoft's C 374runtime library. [#5249] 375<li>Fix a bug where Berkeley DB error message routines could drop core 376on the PowerPC and UltraSPARC architectures. [#5331] 377<li>Rename OSTREAMCLASS to __DB_OSTREAMCLASS in db_cxx.h to avoid 378stepping on application name space. [#5402] 379<li>Support Linux on the S/390 architecture. [#5608] 380<li>Work around a bug in Solaris where the pthread_cond_wait call could 381return because a signal was delivered to the application. [#5640] 382<li>Fix build line for loadable libraries to include -module to support 383Mac OS X. [#5664] 384<li>Fix a bug in the PPC mutex support for the Mac OS X system. [#5781] 385<li>Added support for Java on Mac OS X. A workaround on the Java 386command line is currently necessary; it is documented. [#5664] 387<li>Added support for Tcl on Mac OS X. [#5664] 388<li>Update Windows build instructions to cover Visual C++ .NET. [#5684] 389<li>AIX configuration changes for building on AIX 4.3.3 and 5 with both 390standard and Visual Age compilers. [#5779] 391<li>Add a new UNIX configuration argument, --with-mutex=MUTEX, to allow 392applications to select a mutex implementation. [#6040] 393<li>Changed libtool and configure so we can now correctly build and 394install Tcl and Java loadable shared libraries that work on Mac OS X. 395[#6117] 396<li>Fix mutex alignment problems on historic HP-UX releases that could 397make multiprocess applications fail. [#6250] 398<li>Installed static .a archives on Mac OS X need to be built with the 399ranlib -c option so linked applications will not see undefined __db_jump 400errors. [#6215] 401<li>Upgrade pthread and mmap support in the uClibc library to support 402Berkeley DB. [#6268] 403<li>Fixed error in determining include directories during configuration 404for --enable-java. The error can cause compilation errors on certain 405systems with newer versions of gcc. [#6445] 406 407</ol> 408</body> 409</html> 410