### Berkeley DB 3.3.11 Change Log

### Major New Features:

1. Berkeley DB now continues to run when no disk space is available. [#637]
2. Add Berkeley DB API support for bulk-data returns. [#2934]
3. Add Berkeley DB API support for secondary indices. [#3329]
4. Add support for degree 1 isolation (dirty reads). [#3395]
5. Add support for native Berkeley DB two-phase commit. This requires an additional parameter to txn_prepare (a global transaction id), a new interface that returns the list of prepared but not yet committed transactions, and a new interface that supports transaction discard. [#3563]
6. Add support for the Embedix OS. [#3666]

### Interface Additions and Changes:

1. The new Db handle method DB->truncate supports discard of all records in a database. [#1984]
2. The DB_LOCK_CONFLICT flag has been removed. [#2606]
3. The new DbEnv handle method DBENV->set_lg_regionmax method supports sizing the logging subsystem's region. [#3509]
4. Add support for deadlock resolution based on the transaction holding the fewest, most, and most write locks. [#3020]
5. Replace the DB->set_malloc and DB->set_realloc functions, and the malloc arguments to DB->stat, lock_stat, log_archive, log_stat, memp_stat and txn_stat, with the new DB_ENV->set_alloc and DB->set_alloc interfaces. [#3329]
6. Allow the DB->get_type and DB->get_byteswapped methods to return error values. [#4071]

### General Environment Changes:

1. Fix a bug where threads of control were not properly informed that the database environment had failed with DB_RUNRECOVERY. [#3280]
2. Fix a bug where it was impossible to remove or run recovery on a database environment that had failed with DB_RUNRECOVERY. [#3280]
3. Fix a bug where error messages could be lost when performing recovery on a database environment as part of a DB->open call. [#3340]
4. Detect attempts to use DB handles inside transactions that were not originally created in an environment that supports transactions. [#3406]
5. Fix a bug where recovery could drop core when a subdatabase metadata page was being recovered. [#3454]
6. Fix bug where system mutex resources could be leaked when DB_THREAD was specified, on OSE, VxWorks and QNX. [#3474]
7. Fix a bug where the DBENV->set_feedback method could cause a core dump if the database environment had no existing log files. [#3894]

### General Access Method Changes:

1. Add the DB_FAST_STAT option to the DB->stat method to return only those database statistics that can be acquired without database traversal. Deprecate the DB_CACHED_COUNTS and DB_RECORDCOUNT flags to the DB->stat method. [#2090]
2. Fix bugs in the salvager where various error cases failed to unpin pages. [#2869]
3. Fix a bug where join memory could be allocated using the wrong allocation routines. [#3403]
4. Fix a bug where a transaction handle could be used after it was closed. [#3480]
5. Fix a bug in which a join cursor get could unexpectedly fail, or memory returned by a join cursor get could be freed or corrupted by an unrelated call using the primary database handle. [#3749]
6. Fix a bug in which DB-managed memory returned by a DB->get or DB->put call may be corrupted by a later cursor call. [#3576]
7. Fix a bug where file descriptors could be leaked when attempting to open database files where the metadata page could not be read. [#3786]
8. Fix a bug where the Db.open method could throw a DB_INCOMPLETE exception. [#3885]
9. Fix a bug in which partial gets that specify an offset and length beyond the end of the record could return garbage data. [#4117]

### Btree Access Method Changes:

1. Fix a bug where overwriting a previously deleted data item in a sorted, off-page, duplicate set could fail. [#3617]
2. Fix a bug where the Btree/Recno DB->stat method could leave a page pinned. [#3761]
3. Fix a bug where aborting a child transaction could cause an application crash if cursors were open in the parent transaction. [#4002]

### Hash Access Method Changes:

1. Fix a bug where memory could be freed and then returned to the application. [#3506]
2. Fix a bug where truncating a hash database with off-page duplicate records could drop core.
3. Fix a bug where certain record partial put operations could be unrecoverable. [#3944]
4. Fix a bug where abort when converting from on-page to off-page duplicate sets could cause a core dump. [#3975]
5. Fix a bug where an error in converting from on-page to off-page duplicate sets could leave a page pinned. [#3975]
6. Fix a bug where aborting a child transaction could cause open cursors belonging to a parent transaction to return corrupt or incomplete data. [#4002]
7. Fix a class of bugs in which aborting a child transaction could cause a hash cursor that pointed at a deleted item to start pointing at a different, incorrect item. [#4052] [#4142]

### Queue Access Method Changes:

1. Preserve Queue database extent size across dump/load cycles. [#3323]
2. Fix a bug where calling the DB->stat method on an empty Queue database opened in read-only mode dropped core. [#3333]
3. Fix a bug in which attempts to get nonexistent records in a Queue database could incorrectly return EIO. [#3670]
4. Fix a bug where the delete of an extent file could be unrecoverable. [#3927]
5. Improve concurrency in the Queue access method by removing a log write made while holding a metapage lock during record append. [#3939]
6. Fix a bug where the metapage lock was not released on error. [#3998]
7. Fix a bug where log_archive with the DB_ARCH_DATA flag specified did not return the names of the extent files for Queue databases. [#3968]
8. Improve concurrency in the Queue access method by removing a log write made while holding a metapage lock during record append. [#3939]

### Recno Access Method Changes:

1. Fix a bug in which a DB->get(DB_GET_BOTH) or DBC->c_get(DB_GET_BOTH) operation on a Recno database could erroneously return an item with a matching datum but a different record number from that specified. [#3878]
2. Fix a bug in which implicitly-created data items could incorrectly appear non-empty in a fixed-length Recno database with an re_len greater than the threshold for moving items off-page. [#2934]
3. Fix a bug where partial backing source file records (records terminated by end-of-file) were lost. [#4161]

### C++ API Changes:

1. Add C++ methods to support access from C++ class objects to underlying C objects. [#3656]

### Java API Changes:

1. Fix a bug where calling the env.log_put method caused a core dump. [#3401]
2. Fix a bug where the Java lock statistics structure was out-of-date with the C version and the documentation. [#3489]

### Tcl API Changes:

1. Fix a bug where memory guard bytes were incorrectly checked by the Tcl txn_stat call. [#3431]
2. Fix a bug in which values too large for a signed 32-bit integer, but which would fit in the unsigned 32-bit integer called for by many DB interfaces, would be incorrectly rejected by the Tcl interface on some platforms. [#4184]

### RPC Client/Server Changes:

1. Fix a bug in RPC reply for the DB->join method. [#3425]
2. Change RPC to use Berkeley DB major/minor release numbers as the RPC version numbers. [#3425]
3. Fix a bug where lock detection wasn't being run.
4. Fix a bug where we were not returning the correct value for get_byteswapped when running over RPC. [#3771]
5. Change the method interface from set_server to set_rpc_server and add an argument to allow users to send in a CLIENT structure for us to use for RPC. [#3772]

### XA Resource Manager Changes:

> None.

### Locking Subsystem Changes:

1. Speed up deadlock detector check by linking lockers together so we don't traverse a large and sparse locker table. [#2983]
2. Fix a bug where deadlock detection could be incorrect. [#3479]
3. Fix a bug where deadlock resolution of youngest/oldest transactions incorrectly selected the transaction to abort. [#3149]

### Logging Subsystem Changes:

1. Fix a bug where running recovery on a database environment containing only logs from a previous release of Berkeley DB, in which log.0000000001 doesn't exist, could fail. [#3380]
2. Fix a bug where opening too many files could cause a core dump. [#3399]
3. Fix a bug where resetting the log buffer size could cause a core dump. [#3855]
4. Fix a bug where files in the database environment similarly named to Berkeley DB log files could cause applications to fail. [#4234]

### Buffer Pool Subsystem Changes:

1. Fix a bug where incorrect values for the total size of the cache were being returned by the memp_stat interface. [#3638]
2. Fix a bug where the clean-page count for the Berkeley DB buffer cache could become incorrect. [#3679]
3. Fix a bug where checkpoints could not succeed if there was a temporary backing file for which the process did not have an open file descriptor. [#3826]
4. Detect unreasonable cache sizes, fix a bug where 4GB regions could drop core. [#3904]
5. Fix a bug where checkpoints could be blocked from ever completing if an application combined Berkeley DB access method use of the buffer pool with non-DB use. [#4058]
6. Fix a bug where dirty/clean page counts could be incorrect. [#4249]

### Transaction Subsystem Changes:

1. Fix a potential memory leak in the txn_stat interface. [#3426]

### Utility Changes:

1. Add a -f option to return only those database statistics that can be acquired without database traversal. [#2090]
2. Fix a bug in several utilities where a destroyed DB handle could be used after it was closed, resulting in core dumps. [#3565]
3. Fix a bug where db_load would fail in any environment supporting transactions. [#3565]
4. Fix a bug where db_stat could drop core if the environment had not been configured to support all services. [#3526]
5. Increase the size of the cache created by the db_dump utility when no pre-existing environment is specified. [#4192]

### Database or Log File On-Disk Format Changes:

> None.

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

1. Upgrade to config.guess version 1.193, config.sub version 1.207, autoconf version 2.50.
2. Fix a bug where log_archive could return EINVAL on VxWorks because checkpoint could zero out portions of the log.
3. Add the --with-uniquename=NAME configuration option so that multiple copies of Berkeley DB can be loaded into a single process. [#3025]
4. Document the relationship between log in-memory buffer size and log file size. [#3340]
5. Fix a bug where the user CFLAGS value was overwritten on Linux. [#3375]
6. Fix a bug where the db_recops type values were overwritten by #defines. [#3407]
7. PowerPC/GCC system mutexes were incorrect. [#3417]
8. Fix a bug where --enable-bigfile was incorrectly evaluated. [#3559]
9. Clarify lock_vec documentation with respect to structure fields. [#3552]
10. Fix a mutex memory leak on AIX and HPUX. [#3703]
11. Support by static and shared libraries by default. [#3722]
12. Add mutex support for GCC and Alpha/Sparc platforms. [#3780]
13. Fix Berkeley DB error messages with extraneous trailing newline characters. [#3915]
14. Fix a bug where installing or uninstalling the documentation could remove files other than Berkeley DB's. [#3960]
15. Fix a bug where ssize_t was typed as "int" on Win64. [#3948]
16. Fix a bug where recovery could fail and/or databases be corrupted for applications running on filesystems that do not zero out implicitly created blocks (for example, VxWorks and Windows 95/95). [#4025]