~ubuntu-branches/ubuntu/edgy/rpm/edgy

« back to all changes in this revision

Viewing changes to db/docs/api_tcl/txn_commit.html

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2002-01-22 20:56:57 UTC
  • Revision ID: james.westby@ubuntu.com-20020122205657-l74j50mr9z8ofcl5
Tags: upstream-4.0.3
ImportĀ upstreamĀ versionĀ 4.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!--$Id: txn_commit.so,v 11.16 2001/04/18 13:44:53 bostic Exp $-->
 
2
<!--$Id: m4.tcl,v 11.22 2001/04/18 15:50:10 bostic Exp $-->
 
3
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
 
4
<!--All rights reserved.-->
 
5
<html>
 
6
<head>
 
7
<title>Berkeley DB: txn commit</title>
 
8
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
 
9
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
 
10
</head>
 
11
<body bgcolor=white>
 
12
<a name="2"><!--meow--></a>
 
13
<table width="100%"><tr valign=top>
 
14
<td>
 
15
<h1><i>txn</i> <b>commit</b></h1>
 
16
</td>
 
17
<td align=right>
 
18
<a href="../api_tcl/tcl_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
 
19
</td></tr></table>
 
20
<hr size=1 noshade>
 
21
<tt>
 
22
<h3><pre>txn commit
 
23
        [-nosync]
 
24
        [-sync]
 
25
</pre></h3>
 
26
<h1>Description</h1>
 
27
<p>The <i>txn</i> <b>commit</b> command ends the transaction. 
 
28
<p>In the case of nested transactions, if the transaction is a parent
 
29
transaction with unresolved (neither committed or aborted) child
 
30
transactions, the child transactions are aborted and the commit of the
 
31
parent will succeed.
 
32
<p>In the case of nested transactions, if the transaction is a child
 
33
transaction, its locks are not released, but are acquired by its parent.
 
34
Although the commit of the child transaction will succeed, the actual
 
35
resolution of the child transaction is postponed until the parent
 
36
transaction is committed or aborted; that is, if its parent transaction
 
37
commits, it will be committed, and if its parent transaction aborts, it
 
38
will be aborted.
 
39
<p>If the <b>-nosync</b> option is not specified, a commit log record is
 
40
written and flushed to disk, as are all previously written log records.
 
41
<p>The options are as follows:
 
42
<p><dl compact>
 
43
<p><dt>-nosync<dd>Do not synchronously flush the log. This means the transaction will
 
44
exhibit the ACI (atomicity, consistency, and isolation) properties, but
 
45
not D (durability); that is, database integrity will be maintained, but
 
46
it is possible that this transaction may be undone during recovery
 
47
instead of being redone.
 
48
<p>This behavior may be set for an entire Berkeley DB environment as part of
 
49
the <b>berkdb env</b> interface.
 
50
<p><dt>-sync<dd>Synchronously flush the log. This means the transaction will exhibit
 
51
all of the ACID (atomicity, consistency, isolation and durability)
 
52
properties.
 
53
<p>This behavior is the default for Berkeley DB environments unless the
 
54
<b>-nosync</b> option was specified to the <b>berkdb env</b> or
 
55
<i>env</i> <b>txn</b> interfaces.
 
56
</dl>
 
57
<p>After <i>txn</i> <b>commit</b> has been called, regardless of its return, the
 
58
<b>txn</b> handle may not be accessed again.  If <i>txn</i> <b>commit</b>
 
59
encounters an error, this transaction and all child transactions of this
 
60
transaction are aborted.
 
61
<p>The <i>txn</i> <b>commit</b> command returns 0 on success, and in the case of error, a Tcl error
 
62
is thrown.
 
63
</tt>
 
64
<table width="100%"><tr><td><br></td><td align=right>
 
65
<a href="../api_tcl/tcl_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
 
66
</td></tr></table>
 
67
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
 
68
</body>
 
69
</html>