Berkeley DB Upgrade Guide

Legal Notice

This documentation is distributed under an open source license. You may review the terms of this license at: http://www.oracle.com/technetwork/database/berkeleydb/downloads/oslicense-093458.html

Oracle, 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.

To obtain a copy of this document's original source code, please submit a request to the Oracle Technology Network forum at: https://forums.oracle.com/forums/forum.jspa?forumID=271

5/31/2013


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