CHips L MINI SHELL

CHips L pro

Current Path : /proc/3/task/3/cwd/usr/share/doc/db4-devel-4.7.25/api_c/
Upload File :
Current File : //proc/3/task/3/cwd/usr/share/doc/db4-devel-4.7.25/api_c/txn_prepare.html

<!--$Id: txn_prepare.so,v 10.35 2004/08/13 03:39:03 bostic Exp $-->
<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DB_TXN-&gt;prepare</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DB_TXN-&gt;prepare</b>
</td>
<td align=right>
<a href="../../db4-devel-4.7.25/api_c/api_core.html"><img src="../../db4-devel-4.7.25/images/api.gif" alt="API"></a>
<a href="../../db4-devel-4.7.25/ref/toc.html"><img src="../../db4-devel-4.7.25/images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db.h&gt;
<p>
int
DB_TXN-&gt;prepare(DB_TXN *tid, u_int8_t gid[DB_XIDDATASIZE]);
</pre></b>
<hr size=1 noshade>
<b>Description: DB_TXN-&gt;prepare</b>
<a name="2"><!--meow--></a>
<p>The DB_TXN-&gt;prepare method initiates the beginning of a two-phase commit.</p>
<p>In a distributed transaction environment, Berkeley DB can be used as a local
transaction manager.  In this case, the distributed transaction manager
must send <i>prepare</i> messages to each local manager.  The local
manager must then issue a DB_TXN-&gt;prepare and await its successful
return before responding to the distributed transaction manager.  Only
after the distributed transaction manager receives successful responses
from all of its <i>prepare</i> messages should it issue any
<i>commit</i> messages.</p>
<p>In the case of nested transactions, preparing the parent causes all
unresolved children of the parent transaction to be committed.  Child
transactions should never be explicitly prepared.  Their fate will be
resolved along with their parent's during global recovery.</p>
<p>The DB_TXN-&gt;prepare method
returns a non-zero error value on failure
and 0 on success.
</p>
<b>Parameters</b> <br>
 <b>gid</b><ul compact><li>The <b>gid</b> parameter specifies the global transaction ID by which this
transaction will be known.  This global transaction ID will be returned
in calls to <a href="../../db4-devel-4.7.25/api_c/txn_recover.html">DB_ENV-&gt;txn_recover</a>, telling the application which global
transactions must be resolved.</ul>
<br>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../../db4-devel-4.7.25/api_c/env_class.html">DB_ENV</a>, <a href="../../db4-devel-4.7.25/api_c/txn_class.html">DB_TXN</a>
<br><b>See Also</b>
<a href="../../db4-devel-4.7.25/api_c/txn_list.html">Transaction Subsystem and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../../db4-devel-4.7.25/api_c/api_core.html"><img src="../../db4-devel-4.7.25/images/api.gif" alt="API"></a><a href="../../db4-devel-4.7.25/ref/toc.html"><img src="../../db4-devel-4.7.25/images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
</body>
</html>

Copyright 2K16 - 2K18 Indonesian Hacker Rulez