Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > media > main-release > by-pkgid > a4c98df40e78f6c892308fd6841f950a > files > 199

lib64db4.2-devel-4.2.52-11mdv2007.0.x86_64.rpm

<!--$Id: txn_recover.so,v 10.24 2003/11/08 19:17:51 bostic Exp $-->
<!--Copyright 1997-2003 by Sleepycat Software, Inc.-->
<!--All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_ENV-&gt;txn_recover</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a>
<table width="100%"><tr valign=top>
<td>
<h3>DB_ENV-&gt;txn_recover</h3>
</td>
<td align=right>
<a href="../../db42-devel-4.2.52/api_c/api_index.html"><img src="../../db42-4.2.52/images/api.gif" alt="API"></a>
<a href="../../db42-devel-4.2.52/ref/toc.html"><img src="../../db42-4.2.52/images/ref.gif" alt="Ref"></a>
</td></tr></table>
<hr size=1 noshade>
<tt>
<h3><pre>
#include &lt;db.h&gt;
<p>
int
DB_ENV-&gt;txn_recover(DB_ENV *dbenv, DB_PREPLIST preplist[],
    long count, long *retp, u_int32_t flags);
</pre></h3>
<hr size=1 noshade>
<h3>Description: DB_ENV-&gt;txn_recover</h3>
<p>The DB_ENV-&gt;txn_recover method returns a list of prepared but not yet resolved
transactions.  The DB_ENV-&gt;txn_recover method should only be called after the
environment has been recovered.  Because database environment state must
be preserved between recovery and the application calling
DB_ENV-&gt;txn_recover, applications must either call DB_ENV-&gt;txn_recover
using the same environment handle used when recovery is done, or the
database environment must not be configured using the <a href="../../db42-devel-4.2.52/api_c/env_open.html#DB_PRIVATE">DB_PRIVATE</a>
flag.</p>
<p>On return from DB_ENV-&gt;txn_recover, the <b>preplist</b> parameter will
be filled in with a list of transactions that must be resolved by the
application (committed, aborted or discarded).  The <b>preplist</b>
parameter is a structure of type DB_PREPLIST; the following DB_PREPLIST
fields will be filled in:</p>
<p><dl compact>
<dt>DB_TXN * txn;<dd>The transaction handle for the transaction.
<dt>u_int8_t gid[DB_XIDDATASIZE];<dd>The global transaction ID for the transaction.  The global transaction
ID is the one specified when the transaction was prepared.  The
application is responsible for ensuring uniqueness among global
transaction IDs.
</dl>
<p>The application must call <a href="../../db42-devel-4.2.52/api_c/txn_abort.html">DB_TXN-&gt;abort</a>, <a href="../../db42-devel-4.2.52/api_c/txn_commit.html">DB_TXN-&gt;commit</a> or
<a href="../../db42-devel-4.2.52/api_c/txn_discard.html">DB_TXN-&gt;discard</a> on each returned <a href="../../db42-devel-4.2.52/api_c/txn_class.html">DB_TXN</a> handle before
starting any new operations.</p>
<p>The DB_ENV-&gt;txn_recover method
returns a non-zero error value on failure
and 0 on success.
</p>
<h3>Parameters</h3>
<p><dl compact>
<p><dt><b>count</b><dd>
The <b>count</b> parameter specifies the number of available entries
in the passed-in <b>preplist</b> array.  The <b>retp</b> parameter
returns the number of entries DB_ENV-&gt;txn_recover has filled in, in the
array.
<p><dt><b>flags</b><dd>
The <b>flags</b> parameter must be set to one of the following values:
<p><dl compact>
<p><dt><a name="DB_FIRST">DB_FIRST</a><dd>Begin returning a list of prepared, but not yet resolved transactions.
<p><dt><a name="DB_NEXT">DB_NEXT</a><dd>Continue returning a list of prepared, but not yet resolved transactions,
starting where the last call to DB_ENV-&gt;txn_recover left off.
</dl>
<p><dt><b>preplist</b><dd>
The <b>preplist</b> parameter references memory into which
 the list of transactions to be resolved by the application is copied.
</dl>
<hr size=1 noshade>
<h3>Class</h3>
<a href="../../db42-devel-4.2.52/api_c/env_class.html">DB_ENV</a>, <a href="../../db42-devel-4.2.52/api_c/txn_class.html">DB_TXN</a>
<h3>See Also</h3>
<a href="../../db42-devel-4.2.52/api_c/txn_list.html">Transaction Subsystem and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../../db42-devel-4.2.52/api_c/api_index.html"><img src="../../db42-4.2.52/images/api.gif" alt="API"></a><a href="../../db42-devel-4.2.52/ref/toc.html"><img src="../../db42-4.2.52/images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1><a href="../../db42-devel-4.2.52/sleepycat/legal.html">Copyright (c) 1996-2003</a> <a href="http://www.sleepycat.com">Sleepycat Software, Inc.</a> - All rights reserved.</font>
</body>
</html>