libdb/docs/upgrading/upgrade_4_0_txn.html

144 lines
5.6 KiB
HTML
Raw Permalink Normal View History

2011-09-13 17:44:24 +00:00
<?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>txn_XXX</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_4_0_toc.html" title="Chapter 10. Upgrading Berkeley DB 3.3 applications to Berkeley DB 4.0" />
<link rel="prev" href="upgrade_4_0_mp.html" title="memp_XXX" />
<link rel="next" href="upgrade_4_0_env.html" title="db_env_set_XXX" />
</head>
<body>
<div xmlns="" class="navheader">
<div class="libver">
2012-11-14 21:35:20 +00:00
<p>Library Version 11.2.5.3</p>
2011-09-13 17:44:24 +00:00
</div>
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">txn_XXX</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="upgrade_4_0_mp.html">Prev</a> </td>
<th width="60%" align="center">Chapter 10. Upgrading Berkeley DB 3.3 applications to Berkeley DB 4.0</th>
<td width="20%" align="right"> <a accesskey="n" href="upgrade_4_0_env.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_4_0_txn"></a>txn_XXX</h2>
</div>
</div>
</div>
<p>The C API for the Berkeley DB Transaction subsystem was reworked in the 4.0
release as follows:</p>
<div class="informaltable">
<table border="1" width="80%">
<colgroup>
<col />
<col />
</colgroup>
<thead>
<tr>
<th>Historic functional interface</th>
<th>Berkeley DB 4.X method</th>
</tr>
</thead>
<tbody>
<tr>
<td>txn_abort</td>
<td>
<a href="../api_reference/C/txnabort.html" class="olink">DB_TXN-&gt;abort()</a>
</td>
</tr>
<tr>
<td>txn_begin</td>
<td>
<a href="../api_reference/C/txnbegin.html" class="olink">DB_ENV-&gt;txn_begin()</a>
</td>
</tr>
<tr>
<td>txn_checkpoint</td>
<td>
<a href="../api_reference/C/txncheckpoint.html" class="olink">DB_ENV-&gt;txn_checkpoint()</a>
</td>
</tr>
<tr>
<td>txn_commit</td>
<td>
<a href="../api_reference/C/txncommit.html" class="olink">DB_TXN-&gt;commit()</a>
</td>
</tr>
<tr>
<td>txn_discard</td>
<td>
<a href="../api_reference/C/txndiscard.html" class="olink">DB_TXN-&gt;discard()</a>
</td>
</tr>
<tr>
<td>txn_id</td>
<td>
<a href="../api_reference/C/txnid.html" class="olink">DB_TXN-&gt;id()</a>
</td>
</tr>
<tr>
<td>txn_prepare</td>
<td>
<a href="../api_reference/C/txnprepare.html" class="olink">DB_TXN-&gt;prepare()</a>
</td>
</tr>
<tr>
<td>txn_recover</td>
<td>
<a href="../api_reference/C/txnrecover.html" class="olink">DB_TXN-&gt;recover()</a>
</td>
</tr>
<tr>
<td>txn_stat</td>
<td>
<a href="../api_reference/C/txnstat.html" class="olink">DB_TXN-&gt;stat()</a>
</td>
</tr>
</tbody>
</table>
</div>
<p>Applications calling any of these functions should update their calls
to use the enclosing <a href="../api_reference/C/env.html" class="olink">DB_ENV class</a> handle's method
(easily done as the first argument to the existing call is the correct
handle to use).</p>
<p>As a special case, since applications might potentially have many calls
to the txn_abort, txn_begin and txn_commit functions, those functions
continue to work unchanged in the Berkeley DB 4.0 release.</p>
<p>In addition, the <a href="../api_reference/C/txnstat.html" class="olink">DB_TXN-&gt;stat()</a> call has been changed in the 4.0
release to take a flags argument. To leave their historic behavior
unchanged, applications should add a final argument of 0 to any calls
made to <a href="../api_reference/C/txnstat.html" class="olink">DB_TXN-&gt;stat()</a>.</p>
</div>
<div class="navfooter">
<hr />
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="upgrade_4_0_mp.html">Prev</a> </td>
<td width="20%" align="center">
<a accesskey="u" href="upgrade_4_0_toc.html">Up</a>
</td>
<td width="40%" align="right"> <a accesskey="n" href="upgrade_4_0_env.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">memp_XXX </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
<td width="40%" align="right" valign="top"> db_env_set_XXX</td>
</tr>
</table>
</div>
</body>
</html>