Berkeley DB Upgrade Guide

Legal Notice

Copyright © 2002 - 2019 Oracle and/or its affiliates. All rights reserved.

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

Berkeley DB, and Sleepycat are trademarks or registered trademarks of Oracle. All rights to these marks are reserved. No third-party use is permitted without the express prior written consent of Oracle.

Other names may be trademarks of their respective owners.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services.

1-Jun-2020


Table of Contents

Preface
Conventions Used in this Book
For More Information
Contact Us
1. Introduction
Library version information
2. Upgrading from previous versions of Berkeley DB
3. Upgrading Berkeley DB 4.6 applications to Berkeley DB 4.7
Introduction
Run-time configuration
Replication API
Tcl API
DB_ENV->set_intermediate_dir
Log configuration
Upgrade Requirements
Berkeley DB 4.7.25 Change Log
Database or Log File On-Disk Format Changes:
New Features:
Database Environment Changes:
Concurrent Data Store Changes:
General Access Method Changes:
Btree Access Method Changes:
Hash Access Method Changes:
Queue Access Method Changes:
Recno Access Method Changes:
C-specific API Changes:
Java-specific API Changes:
Direct Persistence Layer (DPL), Bindings and Collections API:
Tcl-specific API Changes:
RPC-specific Client/Server Changes:
Replication Changes:
XA Resource Manager Changes:
Locking Subsystem Changes:
Logging Subsystem Changes:
Memory Pool Subsystem Changes:
Mutex Subsystem Changes:
Transaction Subsystem Changes:
Utility Changes:
Configuration, Documentation, Sample Application, Portability and Build Changes:
4. Upgrading Berkeley DB 4.5 applications to Berkeley DB 4.6
Introduction
C API cursor handle method names
DB_MPOOLFILE->put
B_MPOOLFILE->set
Replication Events
DB_REP_FULL_ELECTION
Verbose Output
DB_VERB_REPLICATION
Windows 9X
Upgrade Requirements
Berkeley DB 4.6.21 Change Log
4.6.21 Patches:
4.6.19 Patches
Database or Log File On-Disk Format Changes:
New Features:
Database Environment Changes:
Concurrent Data Store Changes:
General Access Method Changes:
Btree Access Method Changes:
Hash Access Method Changes:
Queue Access Method Changes:
Recno Access Method Changes:
C++-specific API Changes:
Java-specific API Changes:
Java collections and bind API Changes:
Tcl-specific API Changes:
RPC-specific Client/Server Changes:
Replication Changes:
XA Resource Manager Changes:
Locking Subsystem Changes:
Logging Subsystem Changes:
Memory Pool Subsystem Changes:
Transaction Subsystem Changes:
Utility Changes:
Configuration, Documentation, Portability and Build Changes:
5. Upgrading Berkeley DB 4.4 applications to Berkeley DB 4.5
Introduction
deprecated interfaces
DB->set_isalive
DB_ENV->rep_elect
Replication method naming
Replication events
Memory Pool API
DB_ENV->set_paniccall
DB->set_pagesize
Collections API
--enable-pthread_self
Recno backing text source files
Application-specific logging
Upgrade Requirements
Berkeley DB 4.5.20 Change Log
Database or Log File On-Disk Format Changes:
New Features:
Database Environment Changes:
Concurrent Data Store Changes:
General Access Method Changes:
Btree Access Method Changes:
Hash Access Method Changes:
Queue Access Method Changes:
Recno Access Method Changes:
C++-specific API Changes:
Java-specific API Changes:
Java collections and bind API Changes:
Tcl-specific API Changes:
RPC-specific Client/Server Changes:
Replication Changes:
XA Resource Manager Changes:
Locking Subsystem Changes:
Logging Subsystem Changes:
Memory Pool Subsystem Changes:
Transaction Subsystem Changes:
Utility Changes:
Configuration, Documentation, Portability and Build Changes:
6. Upgrading Berkeley DB 4.3 applications to Berkeley DB 4.4
Introduction
DB_AUTO_COMMIT
DB_DEGREE_2, DB_DIRTY_READ
DB_JOINENV
mutexes
DB_MPOOLFILE->set_clear_len
lock statistics
Upgrade Requirements
Berkeley DB 4.4.16 Change Log
Database or Log File On-Disk Format Changes:
New Features:
Database Environment Changes:
Concurrent Data Store Changes:
General Access Method Changes:
Btree Access Method Changes:
Hash Access Method Changes:
Queue Access Method Changes:
Recno Access Method Changes
C++-specific API Changes:
Java-specific API Changes:
Java collections and bind API Changes:
Tcl-specific API Changes:
RPC-specific Client/Server Changes:
Replication Changes:
XA Resource Manager Changes:
Locking Subsystem Changes:
Logging Subsystem Changes:
Memory Pool Subsystem Changes:
Transaction Subsystem Changes:
Utility Changes:
Configuration, Documentation, Portability and Build Changes:
Berkeley DB 4.4.20 Change Log
Changes since Berkeley DB 4.4.16:
7. Upgrading Berkeley DB 4.2 applications to Berkeley DB 4.3
Introduction
Java
DB_ENV->set_errcall, DB->set_errcall
DBcursor->c_put
DB->stat
DB_ENV->set_verbose
Logging
DB_FILEOPEN
ENOMEM and DbMemoryException
Replication
Run-time configuration
Upgrade Requirements
Berkeley DB 4.3.29 Change Log
Database or Log File On-Disk Format Changes:
New Features:
Database Environment Changes:
Concurrent Data Store Changes:
General Access Method Changes:
Btree Access Method Changes:
Hash Access Method Changes:
Queue Access Method Changes:
Recno Access Method Changes
C++-specific API Changes:
Java-specific API Changes:
Tcl-specific API Changes:
RPC-specific Client/Server Changes:
Replication Changes:
XA Resource Manager Changes:
Locking Subsystem Changes:
Logging Subsystem Changes:
Memory Pool Subsystem Changes:
Transaction Subsystem Changes:
Utility Changes:
Configuration, Documentation, Portability and Build Changes:
8. Upgrading Berkeley DB 4.1 applications to Berkeley DB 4.2
Introduction
Java
Queue access method
DB_CHKSUM_SHA1
DB_CLIENT
DB->del
DB->set_cache_priority
DB->verify
DB_LOCK_NOTGRANTED
Replication
Replication initialization
Database methods and replication clients
DB_ENV->rep_process_message()
Client replication environments
Tcl API
Upgrade Requirements
Berkeley DB 4.2.52 Change Log
Database or Log File On-Disk Format Changes:
New Features:
Database Environment Changes:
Concurrent Data Store Changes:
General Access Method Changes:
Btree Access Method Changes:
Hash Access Method Changes:
Queue Access Method Changes:
Recno Access Method Changes:
C++-specific API Changes:
Java-specific API Changes:
Tcl-specific API Changes:
RPC-specific Client/Server Changes:
Replication Changes:
XA Resource Manager Changes:
Locking Subsystem Changes:
Logging Subsystem Changes:
Memory Pool Subsystem Changes:
Transaction Subsystem Changes:
Utility Changes:
Configuration, Documentation, Portability and Build Changes:
9. Upgrading Berkeley DB 4.0 applications to Berkeley DB 4.1
Introduction
DB_EXCL
DB->associate, DB->open, DB->remove, DB->rename
DB_ENV->log_register
st_flushcommit
DB_CHECKPOINT, DB_CURLSN
DB_INCOMPLETE
DB_ENV->memp_sync
DB->stat.hash_nelem
Java exceptions
C++ exceptions
Application-specific logging and recovery
Upgrade Requirements
Berkeley DB 4.1.24 and 4.1.25 Change Log
Database or Log File On-Disk Format Changes:
Major New Features:
General Environment Changes:
General Access Method Changes:
Btree Access Method Changes:
Hash Access Method Changes:
Queue Access Method Changes:
Recno Access Method Changes:
C++-specific API Changes:
Java-specific API Changes:
Tcl-specific API Changes:
RPC-specific Client/Server Changes:
Replication Changes:
XA Resource Manager Changes:
Locking Subsystem Changes:
Logging Subsystem Changes:
Memory Pool Subsystem Changes:
Transaction Subsystem Changes:
Utility Changes:
Configuration, Documentation, Portability and Build Changes:
Berkeley DB 4.1.25 Change Log
10. Upgrading Berkeley DB 3.3 applications to Berkeley DB 4.0
Introduction
db_deadlock
lock_XXX
log_XXX
memp_XXX
txn_XXX
db_env_set_XXX
DB_ENV->set_server
DB_ENV->set_lk_max
DB_ENV->lock_id_free
Java CLASSPATH environment variable
C++ ostream objects
application-specific recovery
Upgrade Requirements
4.0.14 Change Log
Major New Features:
General Environment Changes:
General Access Method Changes:
Btree Access Method Changes:
Hash Access Method Changes:
Queue Access Method Changes:
Recno Access Method Changes:
C++ API Changes:
Java API Changes:
Tcl API Changes:
RPC Client/Server Changes:
XA Resource Manager Changes:
Locking Subsystem Changes:
Logging Subsystem Changes:
Memory Pool Subsystem Changes:
Transaction Subsystem Changes:
Utility Changes:
Database or Log File On-Disk Format Changes:
Configuration, Documentation, Portability and Build Changes:
11. Upgrading Berkeley DB 3.2 applications to Berkeley DB 3.3
introduction
DB_ENV->set_server
DB->get_type
DB->get_byteswapped
DB->set_malloc, DB->set_realloc
DB_LOCK_CONFLICT
memp_fget, EIO
txn_prepare
--enable-dynamic, --enable-shared
--disable-bigfile
Upgrade Requirements
12. Upgrading Berkeley DB 3.1 applications to Berkeley DB 3.2
introduction
DB_ENV->set_flags
DB callback functions, app_private field
Logically renumbering records
DB_INCOMPLETE
DB_ENV->set_tx_recover
DB_ENV->set_mutexlocks
Java and C++ object reuse
Java java.io.FileNotFoundException
db_dump
Upgrade Requirements
13. Upgrading Berkeley DB 3.0 applications to Berkeley DB 3.1
introduction
DB_ENV->open, DB_ENV->remove
DB_ENV->set_tx_recover
DB_ENV->set_feedback, DB->set_feedback
DB_ENV->set_paniccall, DB->set_paniccall
DB->put
identical duplicate data items
DB->stat
DB_SYSTEM_MEM
log_register
memp_register
txn_checkpoint
environment configuration
Tcl API
DB_TMP_DIR
log file pre-allocation
Upgrade Requirements
14. Upgrading Berkeley DB 2.X applications to Berkeley DB 3.0
introduction
environment open/close/unlink
function arguments
DB_ENV structure
database open/close
db_xa_open
DB structure
DBINFO structure
DB->join
DB->stat
DB->sync and DB->close
lock_put
lock_detect
lock_stat
log_register
log_stat
memp_stat
txn_begin
txn_commit
txn_stat
DB_RMW
DB_LOCK_NOTHELD
EAGAIN
EACCES
db_jump_set
db_value_set
DbEnv class for C++ and Java
Db class for C++ and Java
additional C++ changes
additional Java changes
Upgrade Requirements
15. Upgrading Berkeley DB 1.85 or 1.86 applications to Berkeley DB 2.0
Introduction
System Integration
Converting Applications
Upgrade Requirements