libdb/docs/upgrading/upgrade_4_0_log.html

144 lines
6.2 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>log_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_lock.html" title="lock_XXX" />
<link rel="next" href="upgrade_4_0_mp.html" title="memp_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">log_XXX</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="upgrade_4_0_lock.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_mp.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_log"></a>log_XXX</h2>
</div>
</div>
</div>
<p>The C API for the Berkeley DB Logging 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>log_archive</td>
<td>
<a href="../api_reference/C/logarchive.html" class="olink">DB_ENV-&gt;log_archive()</a>
</td>
</tr>
<tr>
<td>log_file</td>
<td>
<a href="../api_reference/C/logfile.html" class="olink">DB_ENV-&gt;log_file()</a>
</td>
</tr>
<tr>
<td>log_flush</td>
<td>
<a href="../api_reference/C/logflush.html" class="olink">DB_ENV-&gt;log_flush()</a>
</td>
</tr>
<tr>
<td>log_get</td>
<td>
<a href="../api_reference/C/logcursor.html" class="olink">DB_ENV-&gt;log_cursor()</a>
</td>
</tr>
<tr>
<td>log_put</td>
<td>
<a href="../api_reference/C/logput.html" class="olink">DB_ENV-&gt;log_put()</a>
</td>
</tr>
<tr>
<td>log_register</td>
<td>DB_ENV-&gt;log_register</td>
</tr>
<tr>
<td>log_stat</td>
<td>
<a href="../api_reference/C/logstat.html" class="olink">DB_ENV-&gt;log_stat()</a>
</td>
</tr>
<tr>
<td>log_unregister</td>
<td>DB_ENV-&gt;log_unregister</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 (in all cases other
than the log_get call, this is easily done as the first argument to the
existing call is the correct handle to use).</p>
<p>Application calls to the historic log_get function must be replaced
with the creation of a log file cursor (a <a href="../api_reference/C/logc.html" class="olink">DB_LOGC class</a> object), using
the <a href="../api_reference/C/logcursor.html" class="olink">DB_ENV-&gt;log_cursor()</a> method to retrieve log
records and calls to the <a href="../api_reference/C/logcclose.html" class="olink">DB_LOGC-&gt;close()</a> method to destroy the cursor. It
may also be possible to simplify some applications. In previous
releases of Berkeley DB, the DB_CURRENT, DB_NEXT, and DB_PREV flags to the
log_get function could not be used by a free-threaded <a href="../api_reference/C/env.html" class="olink">DB_ENV class</a>
handle. If their <a href="../api_reference/C/env.html" class="olink">DB_ENV class</a> handle was free-threaded, applications
had to create an additional, unique environment handle by separately
calling <a href="../api_reference/C/envopen.html" class="olink">DB_ENV-&gt;open()</a>. This
is no longer an issue in the log cursor interface, and applications may
be able to remove the now unnecessary creation of the additional
<a href="../api_reference/C/env.html" class="olink">DB_ENV class</a> object.</p>
<p>Finally, the <a href="../api_reference/C/logstat.html" class="olink">DB_ENV-&gt;log_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/logstat.html" class="olink">DB_ENV-&gt;log_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_lock.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_mp.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">lock_XXX </td>
<td width="20%" align="center">
<a accesskey="h" href="index.html">Home</a>
</td>
<td width="40%" align="right" valign="top"> memp_XXX</td>
</tr>
</table>
</div>
</body>
</html>