003 File Manager
Current Path:
/usr/local/share/doc/db5/upgrading
usr
/
local
/
share
/
doc
/
db5
/
upgrading
/
π
..
π
BDB_Upgrading.pdf
(1.01 MB)
π
changelog_4_0_14.html
(21.81 KB)
π
changelog_4_1_24.html
(31.99 KB)
π
changelog_4_1_25.html
(2.76 KB)
π
changelog_4_2_52.html
(56.62 KB)
π
changelog_4_3_29.html
(38.92 KB)
π
changelog_4_4_16.html
(33.43 KB)
π
changelog_4_4_20.html
(5.17 KB)
π
changelog_4_5_20.html
(26.06 KB)
π
changelog_4_6.html
(31.67 KB)
π
changelog_4_7.html
(30.09 KB)
π
gettingStarted.css
(1.13 KB)
π
index.html
(76.38 KB)
π
introduction.html
(5.37 KB)
π
moreinfo.html
(7.47 KB)
π
preface.html
(4.99 KB)
π
upgrade_2_0_convert.html
(6.66 KB)
π
upgrade_2_0_disk.html
(2.88 KB)
π
upgrade_2_0_system.html
(7.33 KB)
π
upgrade_2_0_toc.html
(4.22 KB)
π
upgrade_3_0_close.html
(3.73 KB)
π
upgrade_3_0_cxx.html
(3.17 KB)
π
upgrade_3_0_db.html
(5.02 KB)
π
upgrade_3_0_db_cxx.html
(4.3 KB)
π
upgrade_3_0_dbenv.html
(7.83 KB)
π
upgrade_3_0_dbenv_cxx.html
(4.64 KB)
π
upgrade_3_0_dbinfo.html
(8.14 KB)
π
upgrade_3_0_disk.html
(3.35 KB)
π
upgrade_3_0_eacces.html
(2.92 KB)
π
upgrade_3_0_eagain.html
(3.36 KB)
π
upgrade_3_0_envopen.html
(10.19 KB)
π
upgrade_3_0_func.html
(4.63 KB)
π
upgrade_3_0_java.html
(3.38 KB)
π
upgrade_3_0_join.html
(3.06 KB)
π
upgrade_3_0_jump_set.html
(7.04 KB)
π
upgrade_3_0_lock_detect.html
(2.73 KB)
π
upgrade_3_0_lock_notheld.html
(2.87 KB)
π
upgrade_3_0_lock_put.html
(2.81 KB)
π
upgrade_3_0_lock_stat.html
(2.85 KB)
π
upgrade_3_0_log_register.html
(2.73 KB)
π
upgrade_3_0_log_stat.html
(2.67 KB)
π
upgrade_3_0_memp_stat.html
(2.92 KB)
π
upgrade_3_0_open.html
(5.03 KB)
π
upgrade_3_0_rmw.html
(3.28 KB)
π
upgrade_3_0_stat.html
(2.77 KB)
π
upgrade_3_0_toc.html
(7.75 KB)
π
upgrade_3_0_txn_begin.html
(2.73 KB)
π
upgrade_3_0_txn_commit.html
(2.72 KB)
π
upgrade_3_0_txn_stat.html
(2.64 KB)
π
upgrade_3_0_value_set.html
(4.79 KB)
π
upgrade_3_0_xa.html
(3.49 KB)
π
upgrade_3_1_btstat.html
(5.49 KB)
π
upgrade_3_1_config.html
(4.69 KB)
π
upgrade_3_1_disk.html
(3.8 KB)
π
upgrade_3_1_dup.html
(3.24 KB)
π
upgrade_3_1_env.html
(8.03 KB)
π
upgrade_3_1_log_register.html
(3.05 KB)
π
upgrade_3_1_logalloc.html
(2.92 KB)
π
upgrade_3_1_memp_register.html
(3.39 KB)
π
upgrade_3_1_put.html
(5.23 KB)
π
upgrade_3_1_set_feedback.html
(3.26 KB)
π
upgrade_3_1_set_paniccall.html
(3.06 KB)
π
upgrade_3_1_set_tx_recover.html
(4.04 KB)
π
upgrade_3_1_sysmem.html
(2.94 KB)
π
upgrade_3_1_tcl.html
(3.42 KB)
π
upgrade_3_1_tmp.html
(3.36 KB)
π
upgrade_3_1_toc.html
(5.8 KB)
π
upgrade_3_1_txn_check.html
(2.78 KB)
π
upgrade_3_2_callback.html
(4.14 KB)
π
upgrade_3_2_db_dump.html
(3.36 KB)
π
upgrade_3_2_disk.html
(3.14 KB)
π
upgrade_3_2_handle.html
(3.07 KB)
π
upgrade_3_2_incomplete.html
(4.27 KB)
π
upgrade_3_2_mutexlock.html
(3.02 KB)
π
upgrade_3_2_notfound.html
(2.8 KB)
π
upgrade_3_2_renumber.html
(3.79 KB)
π
upgrade_3_2_set_flags.html
(4.54 KB)
π
upgrade_3_2_toc.html
(4.88 KB)
π
upgrade_3_2_tx_recover.html
(3.47 KB)
π
upgrade_3_3_alloc.html
(6.83 KB)
π
upgrade_3_3_bigfile.html
(3.02 KB)
π
upgrade_3_3_conflict.html
(2.75 KB)
π
upgrade_3_3_disk.html
(2.98 KB)
π
upgrade_3_3_getswap.html
(3.18 KB)
π
upgrade_3_3_gettype.html
(3.11 KB)
π
upgrade_3_3_memp_fget.html
(3.63 KB)
π
upgrade_3_3_rpc.html
(3.12 KB)
π
upgrade_3_3_shared.html
(3.24 KB)
π
upgrade_3_3_toc.html
(4.82 KB)
π
upgrade_3_3_txn_prepare.html
(2.88 KB)
π
upgrade_4_0_asr.html
(4.03 KB)
π
upgrade_4_0_cxx.html
(3.6 KB)
π
upgrade_4_0_deadlock.html
(2.99 KB)
π
upgrade_4_0_disk.html
(2.93 KB)
π
upgrade_4_0_env.html
(7.19 KB)
π
upgrade_4_0_java.html
(3.55 KB)
π
upgrade_4_0_lock.html
(5.3 KB)
π
upgrade_4_0_lock_id_free.html
(2.99 KB)
π
upgrade_4_0_log.html
(6.25 KB)
π
upgrade_4_0_mp.html
(8.42 KB)
π
upgrade_4_0_rpc.html
(2.97 KB)
π
upgrade_4_0_set_lk_max.html
(3.11 KB)
π
upgrade_4_0_toc.html
(9.05 KB)
π
upgrade_4_0_txn.html
(5.59 KB)
π
upgrade_4_1_app_dispatch.html
(3.5 KB)
π
upgrade_4_1_checkpoint.html
(3.19 KB)
π
upgrade_4_1_cxx.html
(4.1 KB)
π
upgrade_4_1_disk.html
(3.38 KB)
π
upgrade_4_1_excl.html
(3.07 KB)
π
upgrade_4_1_fop.html
(8.93 KB)
π
upgrade_4_1_hash_nelem.html
(2.82 KB)
π
upgrade_4_1_incomplete.html
(3.08 KB)
π
upgrade_4_1_java.html
(2.92 KB)
π
upgrade_4_1_log_register.html
(2.89 KB)
π
upgrade_4_1_log_stat.html
(2.84 KB)
π
upgrade_4_1_memp_sync.html
(3.25 KB)
π
upgrade_4_1_toc.html
(9.38 KB)
π
upgrade_4_2_cksum.html
(3.13 KB)
π
upgrade_4_2_client.html
(2.76 KB)
π
upgrade_4_2_del.html
(3.69 KB)
π
upgrade_4_2_disk.html
(2.91 KB)
π
upgrade_4_2_java.html
(8.34 KB)
π
upgrade_4_2_lockng.html
(5.83 KB)
π
upgrade_4_2_nosync.html
(3.69 KB)
π
upgrade_4_2_priority.html
(3.18 KB)
π
upgrade_4_2_queue.html
(3.37 KB)
π
upgrade_4_2_repinit.html
(6.09 KB)
π
upgrade_4_2_tcl.html
(2.62 KB)
π
upgrade_4_2_toc.html
(9.93 KB)
π
upgrade_4_2_verify.html
(3.91 KB)
π
upgrade_4_3_cput.html
(2.94 KB)
π
upgrade_4_3_disk.html
(2.93 KB)
π
upgrade_4_3_enomem.html
(4.42 KB)
π
upgrade_4_3_err.html
(3.41 KB)
π
upgrade_4_3_fileopen.html
(2.63 KB)
π
upgrade_4_3_java.html
(5.19 KB)
π
upgrade_4_3_log.html
(3.27 KB)
π
upgrade_4_3_repl.html
(3.97 KB)
π
upgrade_4_3_rtc.html
(2.86 KB)
π
upgrade_4_3_stat.html
(2.91 KB)
π
upgrade_4_3_toc.html
(9.14 KB)
π
upgrade_4_3_verb.html
(3.69 KB)
π
upgrade_4_4_autocommit.html
(4.73 KB)
π
upgrade_4_4_clear.html
(3.33 KB)
π
upgrade_4_4_disk.html
(2.94 KB)
π
upgrade_4_4_isolation.html
(3.07 KB)
π
upgrade_4_4_joinenv.html
(4.86 KB)
π
upgrade_4_4_lockstat.html
(3.06 KB)
π
upgrade_4_4_mutex.html
(3.42 KB)
π
upgrade_4_4_toc.html
(9.22 KB)
π
upgrade_4_5_alive.html
(3.26 KB)
π
upgrade_4_5_applog.html
(3.28 KB)
π
upgrade_4_5_collect.html
(3.1 KB)
π
upgrade_4_5_config.html
(3.13 KB)
π
upgrade_4_5_deprecate.html
(3.39 KB)
π
upgrade_4_5_disk.html
(2.96 KB)
π
upgrade_4_5_elect.html
(4.47 KB)
π
upgrade_4_5_memp.html
(3.32 KB)
π
upgrade_4_5_pagesize.html
(2.89 KB)
π
upgrade_4_5_paniccall.html
(3.41 KB)
π
upgrade_4_5_rep_event.html
(3.23 KB)
π
upgrade_4_5_rep_set.html
(3.22 KB)
π
upgrade_4_5_source.html
(3.53 KB)
π
upgrade_4_5_toc.html
(9.75 KB)
π
upgrade_4_6_cursor.html
(4.02 KB)
π
upgrade_4_6_disk.html
(3.29 KB)
π
upgrade_4_6_event.html
(5.7 KB)
π
upgrade_4_6_full_election.html
(3.29 KB)
π
upgrade_4_6_memp_fput.html
(3.29 KB)
π
upgrade_4_6_memp_fset.html
(2.78 KB)
π
upgrade_4_6_toc.html
(9.41 KB)
π
upgrade_4_6_verb.html
(2.79 KB)
π
upgrade_4_6_verbose.html
(4.92 KB)
π
upgrade_4_6_win.html
(2.81 KB)
π
upgrade_4_7_disk.html
(3.08 KB)
π
upgrade_4_7_interdir.html
(3.18 KB)
π
upgrade_4_7_log.html
(4.23 KB)
π
upgrade_4_7_repapi.html
(3.19 KB)
π
upgrade_4_7_rtc.html
(4.29 KB)
π
upgrade_4_7_tcl.html
(2.96 KB)
π
upgrade_4_7_toc.html
(8.86 KB)
π
upgrade_process.html
(18.08 KB)
Editing: upgrade_2_0_convert.html
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Converting Applications</title> <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> <link rel="start" href="index.html" title="Berkeley DB Upgrade Guide" /> <link rel="up" href="upgrade_2_0_toc.html" title="ChapterΒ 15.Β Upgrading Berkeley DB 1.85 or 1.86 applications to Berkeley DB 2.0" /> <link rel="prev" href="upgrade_2_0_system.html" title="System Integration" /> <link rel="next" href="upgrade_2_0_disk.html" title="Upgrade Requirements" /> </head> <body> <div xmlns="" class="navheader"> <div class="libver"> <p>Library Version 11.2.5.3</p> </div> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">Converting Applications</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="upgrade_2_0_system.html">Prev</a>Β </td> <th width="60%" align="center">ChapterΒ 15.Β Upgrading Berkeley DB 1.85 or 1.86 applications to Berkeley DB 2.0</th> <td width="20%" align="right">Β <a accesskey="n" href="upgrade_2_0_disk.html">Next</a></td> </tr> </table> <hr /> </div> <div class="sect1" lang="en" xml:lang="en"> <div class="titlepage"> <div> <div> <h2 class="title" style="clear: both"><a id="upgrade_2_0_convert"></a>Converting Applications</h2> </div> </div> </div> <p>Mapping the Berkeley DB 1.85 functionality into Berkeley DB version 2 is almost always simple. The manual page <a href="../api_reference/C/dbopen.html" class="olink">DB->open()</a> replaces the Berkeley DB 1.85 manual pages <code class="literal">dbopen</code>(3), <code class="literal">btree</code>(3), <code class="literal">hash</code>(3) and <code class="literal">recno</code>(3). You should be able to convert each 1.85 function call into a Berkeley DB version 2 function call using just the <a href="../api_reference/C/dbopen.html" class="olink">DB->open()</a> documentation.</p> <p>Some guidelines and things to watch out for:</p> <div class="orderedlist"> <ol type="1"> <li>Most access method functions have exactly the same semantics as in Berkeley DB 1.85, although the arguments to the functions have changed in some cases. To get your code to compile, the most common change is to add the transaction ID as an argument (NULL, since Berkeley DB 1.85 did not support transactions.)</li> <li>You must always initialize DBT structures to zero before using them with any Berkeley DB version 2 function. (They do not normally have to be reinitialized each time, only when they are first allocated. Do this by declaring the DBT structure external or static, or by calling the C library routine <code class="literal">bzero</code>(3) or <code class="literal">memset</code>(3).)</li> <li>The error returns are completely different in the two versions. In Berkeley DB 1.85, < 0 meant an error, and > 0 meant a minor Berkeley DB exception. In Berkeley DB 2.0, > 0 means an error (the Berkeley DB version 2 functions return <code class="literal">errno</code> on error) and < 0 means a Berkeley DB exception. See <a href="../programmer_reference/program_errorret.html" class="olink">Program returns to applications</a> for more information.</li> <li>The Berkeley DB 1.85 DB->seq function has been replaced by cursors in Berkeley DB version 2. The semantics are approximately the same, but cursors require the creation of an extra object (the DBC object), which is then used to access the database. <p>Specifically, the partial key match and range search functionality of the R_CURSOR flag in DB->seq has been replaced by the <a href="../api_reference/C/dbcget.html#dbcget_DB_SET_RANGE" class="olink">DB_SET_RANGE</a> flag in <a href="../api_reference/C/dbcget.html" class="olink">DBC->get()</a>.</p></li> <li>In version 2 of the Berkeley DB library, additions or deletions into Recno (fixed and variable-length record) databases no longer automatically logically renumber all records after the add/delete point, by default. The default behavior is that deleting records does not cause subsequent records to be renumbered, and it is an error to attempt to add new records between records already in the database. Applications wanting the historic Recno access method semantics should call the <a href="../api_reference/C/dbset_flags.html" class="olink">DB->set_flags()</a> method with the <a href="../api_reference/C/dbset_flags.html#dbset_flags_DB_RENUMBER" class="olink">DB_RENUMBER</a> flag.</li> <li>Opening a database in Berkeley DB version 2 is a much heavier-weight operation than it was in Berkeley DB 1.85. Therefore, if your historic applications were written to open a database, perform a single operation, and close the database, you may observe performance degradation. In most cases, this is due to the expense of creating the environment upon each open. While we encourage restructuring your application to avoid repeated opens and closes, you can probably recover most of the lost performance by simply using a persistent environment across invocations.</li> </ol> </div> <p>While simply converting Berkeley DB 1.85 function calls to Berkeley DB version 2 function calls will work, we recommend that you eventually reconsider your application's interface to the Berkeley DB database library in light of the additional functionality supplied by Berkeley DB version 2, as it is likely to result in enhanced application performance.</p> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="upgrade_2_0_system.html">Prev</a>Β </td> <td width="20%" align="center"> <a accesskey="u" href="upgrade_2_0_toc.html">Up</a> </td> <td width="40%" align="right">Β <a accesskey="n" href="upgrade_2_0_disk.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">System IntegrationΒ </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top">Β Upgrade Requirements</td> </tr> </table> </div> </body> </html>
Upload File
Create Folder