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>txn 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 TCL API Reference" /> 10 <link rel="up" href="tclapi.html" title="Chapter 1. Berkeley DB Tcl APIs" /> 11 <link rel="prev" href="txn.html" title="env txn" /> 12 <link rel="next" href="txn_checkpoint.html" title="env txn_checkpoint" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center"><span class="emphasis"><em>txn</em></span> abort</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="txn.html">Prev</a> </td> 22 <th width="60%" align="center">Chapter 1. 23 Berkeley DB Tcl APIs 24 </th> 25 <td width="20%" align="right"> <a accesskey="n" href="txn_checkpoint.html">Next</a></td> 26 </tr> 27 </table> 28 <hr /> 29 </div> 30 <div class="sect1" lang="en" xml:lang="en"> 31 <div class="titlepage"> 32 <div> 33 <div> 34 <h2 class="title" style="clear: both"><a id="txn_abort"></a><span class="emphasis"><em>txn</em></span> abort</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">txn abort </pre> 39 <p> 40 The <span class="emphasis"><em>txn</em></span> <span class="bold"><strong>abort</strong></span> 41 command causes an abnormal termination of the transaction. 42 </p> 43 <p> 44 The log is played backward, and any necessary recovery operations are 45 performed. After recovery is completed, all locks held by the 46 transaction are acquired by the parent transaction in the case of a 47 nested transaction, or released in the case of a non-nested 48 transaction. As is the case for <span class="emphasis"><em>txn</em></span> <span class="bold"><strong>commit</strong></span>, applications that require strict 49 two-phase locking should not explicitly release any locks. 50 </p> 51 <p> 52 In the case of nested transactions, aborting the parent transaction 53 causes all children of that transaction to be aborted. 54 </p> 55 <p> 56 After <span class="emphasis"><em>txn</em></span> <span class="bold"><strong>abort</strong></span> 57 has been called, regardless of its return, the <span class="bold"><strong>txn</strong></span> handle may not be accessed again. 58 </p> 59 <p> 60 The <span class="emphasis"><em>txn</em></span> <span class="bold"><strong>abort</strong></span> 61 command returns 0 on success, and in the case of error, a Tcl error is 62 thrown. 63 </p> 64 </div> 65 <div class="navfooter"> 66 <hr /> 67 <table width="100%" summary="Navigation footer"> 68 <tr> 69 <td width="40%" align="left"><a accesskey="p" href="txn.html">Prev</a> </td> 70 <td width="20%" align="center"> 71 <a accesskey="u" href="tclapi.html">Up</a> 72 </td> 73 <td width="40%" align="right"> <a accesskey="n" href="txn_checkpoint.html">Next</a></td> 74 </tr> 75 <tr> 76 <td width="40%" align="left" valign="top"><span class="emphasis"><em>env</em></span> txn </td> 77 <td width="20%" align="center"> 78 <a accesskey="h" href="index.html">Home</a> 79 </td> 80 <td width="40%" align="right" valign="top"> <span class="emphasis"><em>env</em></span> txn_checkpoint</td> 81 </tr> 82 </table> 83 </div> 84 </body> 85</html> 86