• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/db-4.8.30/docs/api_reference/C/
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>DB_ENV-&gt;set_tx_timestamp()</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��12.�� The DB_TXN Handle" />
11    <link rel="prev" href="envset_tx_max.html" title="DB_ENV-&gt;set_tx_max()" />
12    <link rel="next" href="txnabort.html" title="DB_TXN-&gt;abort()" />
13  </head>
14  <body>
15    <div class="navheader">
16      <table width="100%" summary="Navigation header">
17        <tr>
18          <th colspan="3" align="center">DB_ENV-&gt;set_tx_timestamp()</th>
19        </tr>
20        <tr>
21          <td width="20%" align="left"><a accesskey="p" href="envset_tx_max.html">Prev</a>��</td>
22          <th width="60%" align="center">Chapter��12.��
23                The DB_TXN Handle 
24        </th>
25          <td width="20%" align="right">��<a accesskey="n" href="txnabort.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="envset_tx_timestamp"></a>DB_ENV-&gt;set_tx_timestamp()</h2>
35          </div>
36        </div>
37      </div>
38      <pre class="programlisting">#include &lt;db.h&gt;
39
40int
41DB_ENV-&gt;set_tx_timestamp(DB_ENV *dbenv, time_t *timestamp);  </pre>
42      <p>
43         Recover to the time specified by <span class="bold"><strong>timestamp</strong></span> rather than to the most current
44         possible date.
45    </p>
46      <p>
47         Once a database environment has been upgraded to a new version of
48         Berkeley DB involving a log format change (see <a href="../../programmer_reference/upgrade_process.html" class="olink">Upgrading Berkeley DB installations</a>), it is no longer possible to recover to a
49         specific time before that upgrade.
50    </p>
51      <p>
52         The <code class="methodname">DB_ENV-&gt;set_tx_timestamp()</code> method configures operations performed
53         using the specified <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>  handle, not all
54         operations performed on the underlying database environment.
55    </p>
56      <p>
57         The <code class="methodname">DB_ENV-&gt;set_tx_timestamp()</code> method may not be called after the
58         <a class="xref" href="envopen.html" title="DB_ENV-&gt;open()">DB_ENV-&gt;open()</a>  method is
59         called.
60    </p>
61      <p>
62         The <code class="methodname">DB_ENV-&gt;set_tx_timestamp()</code> <span>
63            <span>
64                  method returns a non-zero error value on failure and 0 on success.
65            </span>
66            
67        </span>
68    </p>
69      <div class="sect2" lang="en" xml:lang="en">
70        <div class="titlepage">
71          <div>
72            <div>
73              <h3 class="title"><a id="id1707989"></a>Parameters</h3>
74            </div>
75          </div>
76        </div>
77        <div class="sect3" lang="en" xml:lang="en">
78          <div class="titlepage">
79            <div>
80              <div>
81                <h4 class="title"><a id="id1708103"></a>timestamp</h4>
82              </div>
83            </div>
84          </div>
85          <p>
86                          The <span class="bold"><strong>timestamp</strong></span> parameter references
87                          the memory location where the recovery timestamp is located.          
88                     </p>
89          <p>
90                          The <span class="bold"><strong>timestamp</strong></span> parameter should be the
91                          number of seconds since 0 hours, 0 minutes, 0 seconds, January 1,
92                          1970, Coordinated Universal Time; that is, the Epoch.
93                     </p>
94        </div>
95      </div>
96      <div class="sect2" lang="en" xml:lang="en">
97        <div class="titlepage">
98          <div>
99            <div>
100              <h3 class="title"><a id="id1708260"></a>Errors</h3>
101            </div>
102          </div>
103        </div>
104        <p>
105                         The <code class="methodname">DB_ENV-&gt;set_tx_timestamp()</code> <span>
106            <span>
107                 method may fail and return one of the following non-zero errors:
108            </span>
109            
110        </span>
111                    </p>
112        <div class="sect3" lang="en" xml:lang="en">
113          <div class="titlepage">
114            <div>
115              <div>
116                <h4 class="title"><a id="id1707705"></a>EINVAL</h4>
117              </div>
118            </div>
119          </div>
120          <p>
121                              If it is not possible to recover to the specified time using the log
122                              files currently present in the environment; or if an invalid flag
123                              value or parameter was specified.
124                         </p>
125        </div>
126      </div>
127      <div class="sect2" lang="en" xml:lang="en">
128        <div class="titlepage">
129          <div>
130            <div>
131              <h3 class="title"><a id="id1708163"></a>Class</h3>
132            </div>
133          </div>
134        </div>
135        <p>
136                    <a class="link" href="env.html" title="Chapter��5.�� The DB_ENV Handle">DB_ENV</a>, 
137                    <a class="link" href="txn.html" title="Chapter��12.�� The DB_TXN Handle">DB_TXN</a> 
138            </p>
139      </div>
140      <div class="sect2" lang="en" xml:lang="en">
141        <div class="titlepage">
142          <div>
143            <div>
144              <h3 class="title"><a id="id1707990"></a>See Also</h3>
145            </div>
146          </div>
147        </div>
148        <p>
149                     <a class="xref" href="txn.html#txnlist" title="Transaction Subsystem and Related Methods">Transaction Subsystem and Related Methods</a> 
150                </p>
151      </div>
152    </div>
153    <div class="navfooter">
154      <hr />
155      <table width="100%" summary="Navigation footer">
156        <tr>
157          <td width="40%" align="left"><a accesskey="p" href="envset_tx_max.html">Prev</a>��</td>
158          <td width="20%" align="center">
159            <a accesskey="u" href="txn.html">Up</a>
160          </td>
161          <td width="40%" align="right">��<a accesskey="n" href="txnabort.html">Next</a></td>
162        </tr>
163        <tr>
164          <td width="40%" align="left" valign="top">DB_ENV-&gt;set_tx_max()��</td>
165          <td width="20%" align="center">
166            <a accesskey="h" href="index.html">Home</a>
167          </td>
168          <td width="40%" align="right" valign="top">��DB_TXN-&gt;abort()</td>
169        </tr>
170      </table>
171    </div>
172  </body>
173</html>
174