Debian Codegraph @

docs/api_reference/CXX/txnabort.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>DbTxn::abort()</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C++ API Reference" />
10 <link rel="up" href="txn.html" title="Chapter 13.  The DbTxn Handle" />
11 <link rel="prev" href="txnstat_print.html" title="DbEnv::txn_stat_print()" />
12 <link rel="next" href="txncommit.html" title="DbTxn::commit()" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">DbTxn::abort()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="txnstat_print.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 13. 
26 The DbTxn Handle
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="txncommit.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="txnabort"></a>DbTxn::abort()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 DbTxn::abort();</pre>
45 <p>
46 The <code class="methodname">DbTxn::abort()</code> method causes an abnormal termination of the
47 transaction. The log is played backward, and any necessary undo
48 operations are done through the <span class="bold"><strong>tx_recover</strong></span>
49 function specified to <a class="xref" href="envset_app_dispatch.html" title="DbEnv::set_app_dispatch()">DbEnv::set_app_dispatch()</a>.
50 Before <code class="methodname">DbTxn::abort()</code> returns, any locks held by the transaction
51 will have been released.
52 </p>
53 <p>
54 In the case of nested transactions, aborting a parent transaction
55 causes all children (unresolved or not) of the parent transaction to
56 be aborted.
57 </p>
58 <p>
59 All cursors opened within the transaction must be closed before the
60 transaction is aborted.
61 If they are not closed, they will be closed by
62 this function. If a close operation fails, the rest
63 of the cursors are closed, and the database environment is set to the panic state.
64 </p>
65 <p>
66 After <code class="methodname">DbTxn::abort()</code> has been called, regardless of its return, the
67 <a class="link" href="txn.html" title="Chapter 13.  The DbTxn Handle">DbTxn</a> handle may not be
68 accessed again.
69 </p>
70 <p>
71 The <code class="methodname">DbTxn::abort()</code> <span>
72
73 <span>
74 method either returns a non-zero error value or throws an
75 exception that encapsulates a non-zero error value on
76 failure, and returns 0 on success.
77 </span>
78 </span>
79 </p>
80 <div class="sect2" lang="en" xml:lang="en">
81 <div class="titlepage">
82 <div>
83 <div>
84 <h3 class="title"><a id="idp10428808"></a>Class</h3>
85 </div>
86 </div>
87 </div>
88 <p>
89 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>, <a class="link" href="txn.html" title="Chapter 13.  The DbTxn Handle">DbTxn</a>
90 </p>
91 </div>
92 <div class="sect2" lang="en" xml:lang="en">
93 <div class="titlepage">
94 <div>
95 <div>
96 <h3 class="title"><a id="idp10434272"></a>See Also</h3>
97 </div>
98 </div>
99 </div>
100 <p>
101 <a class="xref" href="txn.html#txnlist" title="Transaction Subsystem and Related Methods">Transaction Subsystem and Related Methods</a>
102 </p>
103 </div>
104 </div>
105 <div class="navfooter">
106 <hr />
107 <table width="100%" summary="Navigation footer">
108 <tr>
109 <td width="40%" align="left"><a accesskey="p" href="txnstat_print.html">Prev</a> </td>
110 <td width="20%" align="center">
111 <a accesskey="u" href="txn.html">Up</a>
112 </td>
113 <td width="40%" align="right"> <a accesskey="n" href="txncommit.html">Next</a></td>
114 </tr>
115 <tr>
116 <td width="40%" align="left" valign="top">DbEnv::txn_stat_print() </td>
117 <td width="20%" align="center">
118 <a accesskey="h" href="index.html">Home</a>
119 </td>
120 <td width="40%" align="right" valign="top"> DbTxn::commit()</td>
121 </tr>
122 </table>
123 </div>
124 </body>
125 </html>