1<!--$Id: 4.2.52.html,v 1.76 2007/05/17 18:17:18 bostic Exp $--> 2<html> 3<head> 4<title>The Berkeley DB Package: DB 4.2.52 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.2.52 Change Log</h3> 11 12<h3>Database or Log File On-Disk Format Changes:</h3> 13<ol> 14 15<li>Queue databases that use encryption or data checksum features with 16extent files will need to be dumped and reloaded prior to using with 17release 4.2. For more details please see the "Upgrading Berkeley DB 18Applications, Queue Access Method" in the Berkeley DB Reference Guide 19included in your download package. [#8671] 20<li>The on-disk log format changed. 21 22</ol> 23<h3>New Features:</h3> 24<ol> 25 26 27<li>Add support for a reduced memory footprint build of the Berkeley DB 28library. [#1967] 29<li>Add the DB_MPOOLFILE->set_flags interface which disallows the 30creation of backing filesystem files for in-memory databases. [#4224] 31<li>Add cache interfaces to limit the number of buffers written 32sequentially to allow applications to bound the time they will 33monopolize the disk. [#4935] 34<li>Support auto-deletion of log files. [#0040] [#6252] 35<li>The new Java DBX API for Berkeley DB allows Java programmers to use 36a familiar Java Collections style API, including Map, while interacting 37with the transactional Berkeley DB core engine. [#6260] 38<li>Support auto-commit with the DB->get method's consume operations. 39[#6954] 40<li>Add "get" methods to retrieve most settings. [#7061] 41<li>Add Javadoc documentation to the Berkeley DB release. [#7110] 42<li>Add support to Concurrent Data Store to allow duplication of write 43cursors. [#7167] 44<li>Add C++ utility classes for iterating over multiple key and data 45items returned from a cursor when using the DB_MULTIPLE or 46DB_MULTIPLE_KEY flags. [#7351] 47<li>Add CamelCased methods to the Java API. [#7396] 48<li>Add the DB_MPOOLFILE->set_maxsize interface to enforce a maximum 49database size. [#7582] 50<li>Add a toString() method for all Java *Stat classes (DbBtreeStat, 51DbHashStat, DbMpoolStat, etc.). This method creates a listing of values 52of all of the class member variables. [#7712] 53 54</ol> 55<h3>Database Environment Changes:</h3> 56<ol> 57 58<li>Add cache interfaces to limit the number of buffers written 59sequentially to allow applications to bound the time they will 60monopolize the disk. [#4935] 61<li>Fix a bug which could cause database environment open to hang, in 62database environments supporting cryptography. [#6621] 63<li>Fix a bug where a database environment panic might result from an 64out-of-disk-space error while rolling back a page allocation. [#6694] 65<li>Fix a bug where a database page write failure, in a database 66environment configured for encryption or byte-swapping, could cause page 67corruption. [#6791] 68<li>Fix a bug where DB->truncate could drop core if there were active 69cursors in the database. [#6846] 70<li>Fix a bug where for databases sharing a physical file required a 71file descriptor per database. [#6981] 72<li>Fix a bug where the panic callback routine was only being called in 73the first thread of control to detect the error when returning 74DB_RUNRECOVERY. [#7019] 75<li>Fix a bug where a transaction which contained a remove of a 76subdatabase and an allocation to another subdatabase in the same file 77might not properly be aborted. [#7356] 78<li>Fix a bug to now disallow DB_TRUNCATE on opens in locking 79environments, since we cannot prevent race conditions. In the absence 80of locking and transactions, DB_TRUNCATE will truncate ANY file for 81which the user has appropriate permissions. [#7345] 82<li>Fix several bugs around concurrent creation of databases. [#7363] 83<li>Change methods in DbEnv that provide access to statistics 84information so that they now return instances of the proper classes. 85[#7395] 86<li>Replace the DB->set_cache_priority API with the 87DB_MPOOLFILE->set_priority API. [#7545] 88<li>Fix a bug where a failure during a creation of a subdatabase could 89then fail in the dbremove cleanup, causing a crash. [#7579] 90<li>Allow creating into a file that was renamed within the same 91transaction. [#7581] 92<li>Fix a bug where DB_ENV->txn_stat could drop core if there are 93more-than-expected active transactions. [#7638] 94<li>Change Berkeley DB to ignore user-specified byte orders when 95creating a database in an already existing physical file. [#7640] 96<li>Fix a bug where a database rename that is aborted would leak some 97memory. [#7789] 98<li>Fix a bug where files could not be renamed or removed if they were 99not writable. [#7819] 100<li>Fix a bug where an error during a database open may leak memory in 101the mpool region. [#7834] 102<li>Fix a bug where the DB_ENV->trickle_sync method could flush all of 103the dirty buffers in the cache rather than a subset. [#7863] 104<li>Fix a bug where an attempt to rename or remove an open file in the 105same transaction could succeed, even though this is not allowed and will 106not work on Windows. [#7917] 107<li>Fix a bug where if a recovery interval in the log contained only 108database opens then a recovery might report "Improper file close". 109[#7886] 110<li>Add a flag, DB_INIT_REP to DB_ENV->open to initialize Replication 111subsystem. [#8299] 112<li>Fix a bug where file remove and rename operations would not block 113each other if they were in different transactions. [#8340] 114<li>Change Berkeley DB to not propagate error returns from the 115application's rep_send function out of the Berkeley DB API. 116[#8496][#8522] 117<li>Remove restriction that DB_TRUNCATE is not allowed on files with 118subdatabases. This restriction was introduced in 4.1.25. [#8852] 119 120</ol> 121<h3>Concurrent Data Store Changes:</h3> 122<ol> 123 124<li>Fix a bug where opens with other threads/processes actively acquiring 125locks on database handles could deadlock. [#6286] 126<li>Add support to Concurrent Data Store to allow duplication of write 127cursors. [#7167] 128 129</ol> 130<h3>General Access Method Changes:</h3> 131<ol> 132 133<li>Fix a bug where the truncate of a database with associated secondary 134databases did not truncate the secondaries. [#6585] 135<li>Fix a bug in which an out-of-disk condition during a transactional 136database create, remove, or rename could cause a crash. [#6695] 137<li>Fix a bug where system errors unknown to the C library could cause 138Berkeley DB utilities to drop core on Solaris. [#6728] 139<li>Fix a bug where Berkeley DB could overwrite incorrectly formatted 140files rather than returning an error to the application during open. 141[#6769] 142<li>Fix a bug DB handle reference counts were incorrect, leading to 143spurious warning about open DB handles. [#6818] 144<li>Fix a bug where cursor adjustments across multiple DB handles could 145fail. [#6820] 146<li>Fix a bug where a failure during open could result in a hang. 147[#6902] 148<li>Fix a bug where repeated failures during certain stages of opens 149could cause error messages to appear during recovery. [#7008] 150<li>Fix a bug in secondary indices with multiple threads calling 151DBC->put that resulted in DB_NOTFOUND being returned. [#7124] 152<li>Fix a bug where database verification might reference memory which 153was previously freed after reporting an error. [#7137] 154<li>Rename the DB_CHKSUM_SHA1 to DB_CHKSUM as Berkeley DB only uses SHA1 155for encrypted pages, not for clear text pages. [#7095] 156<li>Fix a bug where DB->rename could fail silently if the underlying 157system rename call failed. [#7322] 158<li>Fix a bug where Berkeley DB failed to open a file with FCNTL locking 159and 0-length files. [#7345] 160<li>Prohibit the use of the DB_RMW flag on get operations for DB handles 161opened in transactional mode. [#7407] 162<li>Standardize when Berkeley DB will return DB_LOCK_NOTGRANTED, or 163throw DbLockNotGrantedException, versus returning DB_LOCK_DEADLOCK or 164throwing DbDeadlockException. Fix bugs in the C++ and Java APIs where 165DbException was thrown, encapsulating DB_LOCK_NOTGRANTED, rather than 166throwing DbLockNotGrantedException. [#7549] 167<li>Fix a bug where Berkeley DB could hang on a race condition if a 168checkpoint was running at the same time another thread was closing a 169database for the last time. [#7604] 170<li>Fix several bugs that made multiple filesystem level operations 171inside a single transaction break. [#7728] 172<li>Fix a memory leak in the abort path of a sub-database create. 173[#7790] 174<li>Fix a race condition with file close that could cause NULL pointer 175deference under load. [#8235] 176<li>Fix a bug to correct the calculation of the amount of space needed 177to return off page duplicates using the DB_MULTIPLE interface. [#8437] 178<li>Fix a bug where the duplicate data item count could be incorrect if 179a cursor was used to first overwrite and then delete a duplicate which 180was part of a set of duplicates large enough to have been stored outside 181the standard access method pages. [#8445] 182<li>Fix a bug where The DB_MULTIPLE interface might fail to return the 183proper duplicates in some edge cases. [#8485] 184<li>Fix a bug where DB->get(...DB_MULTIPLE) would not return a 185reasonable estimate of the buffer size required to return a set of 186duplicates. [#8513] 187<li>Fix a bug where the DbCursor.count method could return the wrong 188count in the case of small (on-page) duplicate sets, where a still-open 189cursor has been used to delete one of the duplicate data items. [#8851] 190<li>Fix a bug where a non-transactional cursor using DB_MULTIPLE_KEY 191could briefly be left pointing at an unlocked page. This could lead to 192a race condition with another thread deleting records resulting in the 193wrong record being deleted. [#8926] 194<li>Fix a bug where a key/data item could be lost if a cursor is used 195to do a delete, and then immediately used to do an insert which causes 196a set of duplicates to be shifted to an off-page Btree. [#9085] 197 198</ol> 199<h3>Btree Access Method Changes:</h3> 200<ol> 201 202<li>Fix a bug where a deleted item could be left on a database page 203causing database verification to fail. [#6059] 204<li>Fix a bug where a page may be left pinned in the cache if a deadlock 205occurs during a DB->put operation. [#6875] 206<li>Fix a bug where a deleted record may not be removed from a Btree 207page if the page is split while another cursor is trying to delete a 208record on the page. [#6059] 209<li>Fix a bug where records marked for deletion were incorrectly counted 210when retrieving in a Btree by record number. [#7133] 211<li>Fix a bug where a page and lock were left pinned if an application 212requested a record number past the end of the file when retrieving in a 213Btree by record number. [#7133] 214<li>Fix a bug where deleted keys were included in the key count for the 215DB->stat call. [#7133] 216<li>Fix a bug where specifying MULTIPLE_KEY and NEXT_DUP to the bulk get 217interfaces might return the wrong data if all the duplicates could not 218fit in a single buffer. [#7192] 219<li>Remove assertions that triggered failures that were correct 220executions. [#8032] 221<li>Fix a bug where duplicate data items were moved onto overflow pages 222before it was necessary. [#8082] 223<li>Fix a bug where the DB->verify method might incorrectly complain 224about a tree's overflow page reference count. [#8061] 225<li>Fix a bug that could cause DB_MULTIPLE on a Btree database to return 226an incorrect data field at the end of buffer. [#8442] 227<li>Fix a bug where DBC->c_count was returning an incorrect count if the 228cursor was positioned on an item that had just been deleted. [#8851] 229<li>Remove the test for bt_maxkey in the Btree put code. If it is set 230to 1 it can cause an infinite loop. [#8904] 231 232</ol> 233<h3>Hash Access Method Changes:</h3> 234<ol> 235 236<li>Fix a bug where Hash databases could be corrupted on filesystems 237that do not zero-fill implicitly created blocks. [#6588] 238<li>Fix a bug where creating a Hash database with an initial size larger 239than 4GB would fail. [#6805] 240<li>Fix a bug where a page in an unused hash bucket might not be empty 241if there was a disk error while writing the log record for the bucket 242split. [#7035] 243<li>Fix a bug where two threads opening a hash database at the same time 244might deadlock. [#7159] 245<li>Fix a bug where a hash cursor was not updated properly when doing a 246put with DB_NODUPDATA specified. [#7361] 247<li>Fix a bug that could cause DB_MULTIPLE_KEY on Hash databases to 248return improper results when moving from a key with duplicates to a key 249without duplicates. [#8442] 250 251</ol> 252<h3>Queue Access Method Changes:</h3> 253<ol> 254 255<li>Fix a bug where opening an in-memory Queue database with extent size 256specified will dump core. [#6795] 257<li>Support auto-commit with the DB->get method's consume operations. 258[#6954] 259<li>Fix a bug where calling the sync method on a queue database with 260extents may hang if there are active consumers. [#7022] 261<li>Fix a bug where a get(...MULTIPLE...) might lead to an infinite loop 262or return the wrong record number(s) if there was a deleted record at 263the beginning of a page or the buffer was filled exactly at the end of 264a page. [#7064] 265<li>Fix a bug where a database environment checkpoint might hang if a 266thread was blocked waiting for a record while doing a DB_CONSUME_WAIT 267on a Queue database. [#7086] 268<li>Fix a bug where queue extent files would not be removed if a queue 269with extents was removed and its record numbers wrapped around the 270maximum record number. [#7191] 271<li>Fix a bug where a DB->remove of an extent based Queue with a small 272number of pages per extent would generate a segmentation fault. [#7249] 273<li>Fix a bug where verify and salvage on queues with extent files did 274not consider the extent files. [#7294] 275<li>Fix a bug when transaction timeouts are set in the environment they 276would get applied to some non-transactional operations and could cause 277a failure during the abort of a queue operation. [#7641] 278<li>Fix a bug when the record numbers in a queue database wrap around 279at 232, a cursor positioned on a record near the head of the queue that 280is then deleted, may return DB_NOTFOUND when get is specified with 281DB_NEXT rather than the next non-deleted record. [#7979] 282<li>Fix a bug where a record lock will not be removed when the first 283record in the queue is deleted without a transaction (not using 284DB_CONSUME). [#8434] 285<li>Fix a bug where byte swapping was not handled properly in queue 286extent files. [#8358] 287<li>Fix a bug where Queue extent file pages were not properly typed, 288causing the extent files not to use encryption or checksums, even if 289those options had been specified. This fix requires a database upgrade 290for any affected Queue databases. [#8671] 291<li>Fix a bug where truncating a queue with extents may fail to remove 292the last extent file. [#8716] 293<li>Fix a bug where a rename or remove of a QUEUE database with extents 294might leave empty extent files behind. [#8729] 295<li>Fix a bug where on Windows operating systems a "Permission denied" 296error may be raised if a Queue extent is reopened while it is in the 297process of being unlinked. [#8710] 298 299</ol> 300<h3>Recno Access Method Changes:</h3> 301<ol> 302 303<li>Fix a bug where the DB->truncate method may return the wrong record 304count if there are deleted records in the database. [#6788] 305<li>Fix a bug where internal nodes of Recno trees could get wrong record 306count if a log write failed and the log was later applied during 307recovery. [#6841] 308<li>Fix a bug where a cursor next operation could infinitely loop after 309deleting a record, when the deleted record was immediately followed by 310implicitly created records. [#8133] 311 312</ol> 313<h3>C++-specific API Changes:</h3> 314<ol> 315 316<li>Document the DB->del method can return DB_KEYEMPTY for Queue or 317Recno databases. The C++ and Java APIs now return this value rather than 318throwing an exception. [#7030] 319<li>Add "get" methods to retrieve most settings. [#7061] 320<li>Fix a bug where applications calling DB->verify from the C++ or Java 321APIs could drop core. Change the DB->verify method API to act as a DB 322handle destructor. [#7418] 323<li>Add utility classes for iterating over multiple key and data items 324returned from a cursor when using the DB_MULTIPLE or DB_MULTIPLE_KEY 325flags. These classes, DbMultipleDataIterator, DbMultipleKeyDataIterator, 326and DbMultipleRecnoDataIterator, mirror the DB Java API and are provided 327as replacements for the C macros, DB_MULTIPLE_INIT, DB_MULTIPLE_NEXT, 328DB_MULTIPLE_KEY_NEXT, and DB_MULTIPLE. [#7351] 329<li>Fix a bug DbException was thrown, encapsulating DB_LOCK_NOTGRANTED, 330rather than throwing DbLockNotGrantedException. [#7549] 331<li>Add the DbEnv handle to exceptions thrown by the C++ and Java APIs, 332where possible. [#7303] 333<li>Fix a bug in the C++ DbEnv::set_rep_transport signature so that the 334envid parameter is signed. [#8303] 335<li>Make the fields of DB_LSN public in the DbLsn class. [#8422] 336 337</ol> 338<h3>Java-specific API Changes:</h3> 339<ol> 340 341<li>New Java API (com.sleepycat.dbx.*) for the transactional storage of 342data using the Java Collections design pattern. [#6569] 343<li>Fix a bug in the Java Dbt.get_recno_key_data() method when used 344inside callbacks. [#6668] 345<li>Fix Java DbMpoolStat class to match the DB_MPOOL_STAT struct. 346[#6821] 347<li>Fix a bug where Dbc.put expected key data even if the key was 348unused. [#6932] 349<li>Fix a bug in the Java API secondary_key_create callback where memory 350was freed incorrectly, causing JVM crashes. [#6970] 351<li>Re-implement the Java API to improve performance and maintenance. 352Fix several inconsistencies in the Java API: 353<ol type="a"> 354<li>Db.put(), Dbc.get() and Dbc.put() preserve key size 355<li>Dbc.get() returns DB_KEYEMPTY rather than throwing an exception 356<li>The return type of Db.close() is now void. [#7002] 357</ol> 358<li>Document the DB->del method can return DB_KEYEMPTY for Queue or 359Recno databases. The C++ and Java APIs now return this value rather than 360throwing an exception. [#7030] 361<li>Add "get" methods to retrieve most settings. [#7061] 362<li>Add Javadoc documentation to the Berkeley DB release. [#7110] 363<li>Fix a bug that caused potential memory corruption when using the 364Java API and specifying the DB_DBT_REALLOC flag. [#7215] 365<li>Add the DbEnv handle to exceptions thrown by the C++ and Java APIs, 366where possible. [#7303] 367<li>Map existing c-style API to a more Java camel case API with Java 368style naming. Retained deprecated older API for the 4.2 release for 369backwards support in all cases except callback interfaces. Also 370overloaded methods such as get/pget() into multiple different get() 371calls to clean up call structure. [#7378] 372<li>Add CamelCased methods to the Java API. [#7396] 373<li>Fix a bug where applications calling DB->verify from the C++ or Java 374APIs could drop core. Change the DB->verify method API to act as a DB 375handle destructor. [#7418] 376<li>Fix a bug DbException was thrown, encapsulating DB_LOCK_NOTGRANTED, 377rather than throwing DbLockNotGrantedException. [#7549] 378<li>Add a toString() method for all Java *Stat classes (DbBtreeStat, 379DbHashStat, DbMpoolStat, etc.). This method creates a listing of values 380of all of the class member variables. [#7712] 381<li>Remove Db.fd() method from Java API as it has no value to a Java 382programmer. [#7716] 383<li>Add an accessible timeout field in the DbLockRequest class, needed 384for the DB_LOCK_GET_TIMEOUT operation of DbEnv.lockVector. [#8043] 385<li>Fix replication method calls from Java API. [#8467] 386<li>Fix a bug where exception returns were inconsistent. [#8622] 387<li>Change the Java API so that it throws an IllegalArgumentException 388rather than a DbException with the platform-specific EINVAL. [#8978] 389 390</ol> 391<h3>Tcl-specific API Changes:</h3> 392<ol> 393 394<li>Add "get" methods to retrieve most settings. [#7061] 395<li>Brought Tcl's $env set_flags command up to date with available flags. 396[#7385] 397<li>Update Berkeley DB to compile cleanly against the Tcl/Tk 8.4 release. 398[#7612] 399<li>Made txn_checkpoint publicly available. [#8594] 400 401</ol> 402<h3>RPC-specific Client/Server Changes:</h3> 403<ol> 404 405<li>Fix two bugs in the RPC server where incorrect handling of illegal 406environment home directories caused server crashes. [#7075] 407<li>Fix a bug where the DB_ENV->close method would fail in RPC clients 408if the DB_ENV->open method was never called. [#8200] 409 410</ol> 411<h3>Replication Changes:</h3> 412<ol> 413 414<li>Write prepare records synchronously on replication clients so that 415prepare operations are always honored in the case of failure. [#6416] 416<li>Change replication elections so that the client with the biggest LSN 417wins, and priority is a secondary factor. [#6568] 418<li>Fix a bug where replicas could not remove log files because the 419checkpoint lsn was not being updated properly. [#6620] 420<li>Force prepare records out to disk regardless of the setting of the 421DB_TXN_NOSYNC flag. [#6614] 422<li>Add a new flag, DB_REP_NOBUFFER, which gets passed to the rep_send 423function specified in DBENV->rep_set_transport, to indicate that the 424message should not be buffered on the master, but should be immediately 425transmitted to the client(s). [#6680] 426<li>Fix a replication election bug where Berkeley DB could fail to elect 427a master even if a master already existed. [#6702] 428<li>Allow environment wide setting of DB_AUTO_COMMIT on replication 429clients. [#6732] 430<li>Fix a replication bug where a client coming up in the midst of an 431election might not participate in the election. [#6826] 432<li>Add log_flushes when sites become replication masters. If log_flush 433fails, panic the environment since the clients already have the commits. 434[#6873] 435<li>Fix a replication bug where a brand new client syncing up could 436generate an error on the master. [#6927] 437<li>Fix a bug where clients synchronize with the master when they come 438up with the same master after a client-side disconnect or failures. 439[#6986] 440<li>Fix several bugs in replication elections turned up by test rep005. 441[#6990] 442<li>Fix a bug where aborted hash group allocations were not properly 443applied on replicas. [#7039] 444<li>Fix race conditions between running client recovery and other 445threads calling replication and other Berkeley DB functions. [#7402] 446[#8035] 447<li>Use shared memory region for all replication flags. [#7573] 448<li>Fix a bug where log archive on clients could prematurely remove log 449files. [#7659] 450<li>Return an error if a non-replication dbenv handle attempts to write 451log records to a replication environment. [#7752] 452<li>Fix a race condition when clients applied log records, where we 453would store a log record locally and then never notice we have it, and 454need to re-request it from the master, causing the client to get far 455behind the master. [#7765] 456<li>Fix inconsistencies between the documentation and actual code 457regarding when replication methods can be called. [#7775] 458<li>Fix a bug where Berkeley DB would wait forever if a NEWMASTER 459message got dropped. [#7897] 460<li>Fix a bug where the master environment ID did not get set when you 461called DBENV->rep_start as a master. [#7899] 462<li>Fix a bug where operations on a queue database will not get 463replicated if the transactions that include the operations are committed 464out of order with the operations. [#7904] 465<li>Fix bugs in log_c_get where an invalid LSN could access invalid 466addresses. Fix bug in elections where a client upgrading to master 467didn't write a txn_recycle record. [#7964] 468<li>Fix a bug where REP_VERIFY_FAIL during client recovery wasn't being 469handled. [#8040] 470<li>Return an error if the application calls rep_process_message before 471calling rep_start when starting. [#8057] 472<li>Fix a bug to ensure that replication generation numbers always 473increase and are never reset to 1. [#8136] 474<li>Modify log message retransmission protocol to efficiently handle the 475case where a large number of contiguous messages were dropped at once. 476[#8182] [#8169] [#8188] 477<li>Fix a bug where using the wrong mutex in replication which under 478certain conditions could cause replication to hang. Also fix a bug where 479incorrectly setting the checkpoint LSN could cause recovery to take a 480very long time. [#8183] 481<li>Fix bug where a message could get sent to an invalid master. [#8184] 482<li>Fix a bug where a local variable in log_archive was not initialized. 483[#8230] 484<li>Fix a bug where elections could hang. [#8254] 485<li>Fix a bug to ensure that we can always remove/re-create the temporary 486replication database after a failure. [#8266] 487<li>Add a flag, DB_INIT_REP to DB_ENV->open to initialize Replication 488subsystem. [#8299] 489<li>Add new ret_lsnp argument to rep_process_message so that LSNs can 490be returned to clients on permanent records. Add new lsnp arg to the 491send callback function so that the master can know the LSNs of records 492as well. [#8308] 493<li>Narrow the window where we block due to client recovery. [#8316] 494<li>Fix a bug in log_c_incursor where we would not detect that a record 495was already in the buffer. [#8330] 496<li>Fix a bug that would allow elections to be managed incorrectly. 497[#8360] 498<li>Fix a bug where replicas were not maintaining meta->last_pgno 499correctly. [#8378] 500<li>Fix a bug in truncating log after recovery to a timestamp or 501replication-based recovery. [#8387] 502<li>Fix a bug where a checkpoint record written as the first record in 503a log could cause recovery to fail. [#8391] 504<li>Fix a bug where a client would return DB_NOTFOUND instead of 505DB_REP_OUTDATED when it was unable to synchronize with the master 506because it ran out of log records. [#8399] 507<li>Fix a bug where log file changes were not handled properly in 508replication. [#8400] [#8420] 509<li>Fix a bug where checking for invalid log header data could fail 510incorrectly. [#8460] 511<li>Fix a bug where DB_REP_PERMANENT was not being set when log records 512were re-transmitted. [#8473] 513<li>Modify elections so that all participants elect in the same election 514generation. [#8590] 515<li>Fix bug where rep_apply was masking an error return. Also return 516DB_RUNRECOVERY if the replication client cannot commit or checkpoint. 517[#8636] 518<li>Fix a bug to update the last_pgno on the meta page on free as well 519as alloc. [#8637] 520<li>Fix a bug to roll back the LSN on a queue database metapage if we're 521going to truncate the log. Fix a bug in MASTER_CHECK so we don't apply 522log messages from an unknown master. Fix a bug to perform a sync on 523rep_close. [#8601] 524<li>Fix a bug so that we reset the LSN when putting pages on the free 525list. [#8685] 526<li>Fix a bug where replication was not properly calling db_shalloc. 527[#8811] 528<li>Fix a bug where replication flags were getting set in multiple steps 529which could cause an Assertion Failure in log_compare. [#8889] 530<li>Fix a bug where open database handles could cause problems on 531clients. [#8936] 532<li>Fix a bug where in dbreg code where an fnp with an invalid fileid 533could be found on the lp->fq list. [#8963] 534<li>Fix a bug where a reader on a replication client could see partial 535updates when replicating databases with off page duplicates or overflow 536records. [#9041] 537<li>Fix a bug that could result in a self deadlock in dbreg under 538replication. [#9138] 539<li>Fix a memory leak in replication. [#9255] 540 541</ol> 542<h3>XA Resource Manager Changes:</h3> 543<ol> 544 545<li>Fix a bug where a failed write during XA transaction prepare could 546result in a checksum error in the log. [#6760] 547<li>Fix a bug where we were not properly handling DB_AUTO_COMMIT in XA 548transactions and where we were not honoring the XA transaction during 549an XA-protected open. [#6851] 550<li>Add infrastructure support for multithreaded XA. [#6865] 551<li>Display XA status and ID as part of db_stat -t output. [#6413] 552 553</ol> 554<h3>Locking Subsystem Changes:</h3> 555<ol> 556 557<li>Fix a bug where locks were not cleared in an off-page duplicate 558cursor. [#6950] 559<li>Fix a bug where a deadlock may not be detected if dirty reads are 560enabled and the deadlock involves an aborting transaction. [#7143] 561<li>Fix a bug where a transaction doing updates while using dirty read 562locking might fail while aborting the transaction with a deadlock. 563Several other locking issues were also fixed: 564<ol type="a"> 565<li>failure to remove dirty read locks prior to aborting a transaction, 566<li>calling upgrade on other than WWRITE locks, 567<li>failure to remove expired locks from the locker queue, 568<li>clearing the lock timeout before looking at it. [#7267] 569</ol> 570<li>Fix a bug when dirty reads are enabled a writer might be blocked on 571a lock that it had previously obtained. Dirty readers would also wait 572behind regular readers when they could have safely read a page. [#7502] 573<li>Fix a bug where a DB->put using CDB gets a lock timeout then the 574error "Closing already closed cursor". [#7597] 575<li>Modify the maximum test-and-set mutex sleep for logical page locks 576at 10ms, everything else at 25ms. [#7675] 577<li>Fix a bug where the DB_LOCK_TIMEOUT mode of env->lock_vec could 578hang. [#7682] 579<li>Fix a bug where running with only transaction timeouts for deadlock 580detection might deadlock without being detected if more than one 581transaction times out while trying to avoid searching a Btree on 582repeated inserts. [#7787] 583<li>Fix a bug that could cause detection to not run when there was a 584lock that should be timed out. [#8588] 585<li>Fix a bug with using dirty reads with subtransactions. If a writing 586subtransaction aborts and then is blocked, the deadlock may not be 587detected. [#9193] 588<li>Fix a bug where handle locks were not being correctly updated when 589releasing read locks during transaction prepare. [#9275] 590 591</ol> 592<h3>Logging Subsystem Changes:</h3> 593<ol> 594 595<li>Fix a bug where if a write error occurred while committing a 596transaction with DB_WRITE_NOSYNC enabled the transaction may appear to 597be committed in the log while it was really aborted. [#7034] 598<li>Fix a bug where multiprocess applications could violate write-ahead 599logging requirements if one process wrote a log record but didn't flush 600it, the current log file then changed, and another process wrote a 601database page before the log record was written to disk. [#6999] 602<li>Fix a bug where fatal recovery could fail with a "Transaction 603already committed" error if recovery had been run and there are no 604active transactions in the part of the log following the last 605checkpoint. [#7234] 606<li>Fix a bug where recovery would fail to put freed pages onto the free 607list, when both committed and aborted subtransactions that allocated new 608pages were present. This only affected prepared transactions. [#7403] 609<li>Fix a bug where open errors during recovery get propagated unless 610they are reporting missing files, which might correctly have been 611removed. [#7578] 612<li>Fix a bug so that we now validate a log file before writing to it. 613[#7580] 614<li>Fix a bug where Berkeley DB could display the unnecessary error 615message "DB_LOGC->get: short read" during recovery. [#7700] 616<li>Fix a bug where recovery may fail if it tries to reallocate a page 617to a file that is out of space. [#7780] 618<li>Change Berkeley DB so that operations on databases opened in a 619non-transactional mode do not write records into the database logs. 620[#7843] 621<li>Fix a bug where Berkeley DB could timeout waiting for locks (on 622Queue databases) during recovery. [#7927] 623<li>Fix a bug in truncating log after recovery to a timestamp or 624replication-based recovery. [#8387] 625<li>Fix a bug where recovery can be slow if the log contains many opens 626of files which contain multiple databases. [#8423] 627<li>Fix a bug where a file id could be used before its open was logged. 628[#8496] 629<li>Fix a bug where recovery would partially undo a database create if 630the transaction which created it spanned log files and not all of the 631log files were present during recovery. [#9039] 632 633</ol> 634<h3>Memory Pool Subsystem Changes:</h3> 635<ol> 636 637<li>Fix a bug where checksummed files could not be read on different 638endian systems. [#6429] 639<li>Fix a bug where read-only databases were not mapped into memory but 640were instead read through the Berkeley DB buffer cache. [#6671] 641<li>Fix a bug where Berkeley DB could loop infinitely if the cache was 642sized so small that all of its pages were simultaneously pinned by the 643application. [#6681] 644<li>Fix a bug where DbEnv.sync could fail to write a page if another 645thread unpinned the page at the same time and there were no other pages 646in that hash bucket. [#6793] 647<li>Fix a bug where threads of control may hang if multiple threads of 648control are opening and closing a database at the same time. [#6953] 649<li>Fix a bug where a database created without checksums but later 650opened with checksums would result in a checksum error. [#6959] 651<li>Fix a bug where a multiprocess application suite could see 652incorrect data if one process opened a non-checksummed database 653correctly and another process subsequently opened the same database, 654specifying checksums. [#6959] 655<li>Change to avoid database open and flush when handles are discarded, 656if the handle was never used to write anything. [#7232] 657<li>Fix a bug where applications dirtying the entire cache in a single 658database operation would see large performance degradation. [#7273] 659<li>Fix a bug where contention in the buffer pool could cause the buffer 660allocation algorithm to unnecessarily sleep waiting for buffers to be 661freed. [#7572] 662 663</ol> 664<h3>Transaction Subsystem Changes:</h3> 665<ol> 666 667<li>Fix a bug where disk write errors in encrypted database 668environments, causing transaction abort, could corrupt the log. [#6768] 669<li>Fix a bug where catastrophic recovery may fail on a log which has a 670prepared transaction which aborted the allocation of a new page and was 671rolled forward previously by another recovery session. [#6790] 672<li>Fix a bug where a transaction that contains a database truncate 673followed by page allocations, may not properly undo the truncate if 674aborted. [#6862] 675<li>Fix a bug which causes Berkeley DB to checkpoint quiescent database 676environments. [#6933] 677<li>Fix a bug where if a transaction prepare fails while writing the 678prepare log record, and it contains a subtransaction which did an 679allocation later, recovery of the database may fail with a log sequence 680error. [#6874] 681<li>Do not abort prepared but not yet completed transactions when 682closing an environment. [#6993] 683<li>Fix a bug where operations on the source of a rename in the same 684transaction would fail. [#7537] 685<li>Fix a bug where a parent transaction which aborts when it tries to 686write its commit record could fail with a log sequence error, if the 687parent transaction has an aborted child transaction which allocated a 688new page from the operating system. [#7251] 689<li>Fix a bug where Berkeley DB could try to abort a partial transaction 690because it contained a partial subtransaction. [#7922] 691<li>Fix a bug where Berkeley DB could drop core when transactions were 692configured without locking support. [#9255] 693 694</ol> 695<h3>Utility Changes:</h3> 696<ol> 697 698<li>Fix a bug where db_load could core dump or corrupt record numbers 699by walking off the end of a string. [#6985] 700<li>Fix a bug where db_load could run out of locks when loading large 701numbers of records. [#7173] 702<li>Fix a bug where db_dump could drop core when salvaging unaligned 703entries on a Btree page. [#7247] 704<li>Fix a bug where hash statistics did not include overflow items in 705the count of database data elements. [#7473] 706<li>Fix a bug where an corruption in an overflow page list could cause 707DB->verify to infinitely loop. [#7663] 708<li>Fix a bug where verify could display extraneous error messages when 709verifying a Btree with corrupt or missing pages. [#7750] 710<li>Fix a bug that could cause the db_stat utility to display values 711larger than 100 for various percentages. [#7779] 712<li>Fix a memory overflow bug in db_load. [#8124] 713<li>Fix a minor leak when verifying queue databases. [#8620] 714 715</ol> 716<h3>Configuration, Documentation, Portability and Build Changes:</h3> 717<ol> 718 719<li>Add support for a reduced memory footprint build of the Berkeley DB 720library. [#1967] 721<li>Change DB_SYSTEM_MEM on Windows to fail immediately when opening an 722environment whose regions were deleted on last close. [#4882] 723<li>Update queue.h to current FreeBSD version. [#5494] 724<li>Support for and certification under Tornado 2.2/VxWorks 5.5. [#5522] 725<li>Add support for IBM OS/390 using the IBM C compiler. [#6486] 726<li>Specify -pthread as a compile flag for Tru64 systems, not just as a 727linker flag. [#6637] 728<li>Remove automatic aggregate initialization for non-ANSI compilers. 729[#6664] 730<li>Fix a link error ("GetLongPathNameA could not be located in the 731dynamic link library KERNEL32.dll") that prevented Berkeley DB from 732loading on Windows NT. [#6665] 733<li>Remove use of U suffix in crypto build to denote unsigned integers 734for non-ANSI compilers. [#6663] 735<li>Fix Java API documentation problems where API return values were int 736and should have been void, or vice versa. [#6675] 737<li>Add an include of <sys/fcntl.h> for old Solaris systems with the 738directio call. [#6707] 739<li>Fix Java API documentation problem where the Db.associate call was 740missing a DbTxn handle. [#6714] 741<li>Clean up source based on gcc's -Wmissing-prototypes option. [#6759] 742<li>Ignore pread/pwrite interfaces on NCR's System V R 4.3 system. 743[#6766] 744<li>Fix an interface compatibility with Sendmail and Postfix releases. 745[#6769] 746<li>Fix warnings when the Tcl API was built without TEST_CONFIG defined. 747[#6789] 748<li>Change Win32 mutexes to use the shared code for all mutexes to fix 749handle leak. [#6822] [#6853] 750<li>Fix the Windows/Tcl API export list for Berkeley DB XML. [#6931] 751<li>Add the --enable-mingw configuration option to build Berkeley DB for 752MinGW. [#6973] 753<li>Add a CPU pause to the mutex spinlock code to improve performance 754on newer Pentium CPUs. [#6975] 755<li>Upgrade read-only file descriptors to read-write during checkpoint, 756it's an error to call FlushFileBuffers on a read-only Windows file 757handle. [#7051] 758<li>Fix configure so that Java applications on HP/UX can access RPC 759environments. [#7066] 760<li>Update Berkeley DB to use libtool 1.5 to allow building of shared 761libraries on various platforms. This should not be visible except for 762changes to the Makefile and internal build procedures. [#7080] 763<li>Fix a bug where the configure script displayed incorrect default 764installation directory information. [#7081] 765<li>Fix a signed/unsigned warning with some Windows compilers. [#7100] 766<li>Fix macro redefinition conflicts between queue.h and 767Vc7\PlatformSDK\Include\WinNT.h when building with Visual Studio.NET 7687.0. [#7103] 769<li>Add a loop to retry system calls that return EBUSY. Also limit 770retries on EINTR to 100 times. [#7118] 771<li>Fix a bug in our use of GetDiskFreeSpace that caused access 772violations on some versions of Windows with DB_DIRECT_DB. [#7122] 773<li>Fix a bug where regions in system memory on Windows were incorrectly 774reinitialized because the magic number was overwritten. [#7127] 775<li>Change version provided to Tcl's package system to reflect Berkeley 776DB's major and minor number. [#7174] 777<li>Support for the Berkeley DB Embedix port has been removed. [#7209] 778<li>Merge all public C++ headers into db_cxx.h, which fixes name clashes 779between Berkeley DB headers and system headers (specifically mutex.h). 780[#7221] 781<li>Fix a bug where the configured Makefile could try and build objects 782for which there were no existing rules. [#7227] 783<li>Port the ex_repquote example to Windows. [#7328] 784<li>Fix a race in the ARM/gcc mutex code which could cause almost 785anything bad you can imagine. [#7468] 786<li>Fix a bug where shared region removal could hang. [#7613] 787<li>Fix a bug so that when using Java in Debug mode on Windows, 788automatically pick the Debug DLL. [#7722] 789<li>Fix configure --disable-shared so that it now creates a Makefile 790that installs static libraries that look the same as a regular shared 791build. This flag will create a libdb<major>.<minor>.a and 792make a libdb.a that is a symlink to it. [#7755] 793<li>Add support for OS/390 2.10 and all versions of z/OS. [#7972] 794<li>Support Java builds on Windows with spaces in the project path. 795[#8141] 796<li>Fix a bug where Berkeley DB mutex locking code for OS X was not 797multiprocessor safe. [#8255] 798<li>Add an error to DB_ENV->set_flags if the OS does not support Direct 799I/O. [#8596] 800<li>Enable verbose error logging from the test suite on Windows. [#8634] 801<li>Fix a bug with DLL linking on Cygwin under Windows. [#8628] 802<li>Add support for JDK on HP/UX. [#8813] 803<li>Fix a bug where pathnames longer than 2KB could cause processes to 804core dump. [#8886] 805<li>Fix a bug in VxWorks when yielding the CPU, so that we delay at 806least one tick. [#9061] 807 808</ol> 809 810</body> 811</html> 812