~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/docs/api_c/db_rename.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!--$Id$-->
2
 
<!--$Id$-->
3
 
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
4
 
<!--All rights reserved.-->
5
 
<!--See the file LICENSE for redistribution information.-->
6
 
<html>
7
 
<head>
8
 
<title>Berkeley DB: DB-&gt;rename</title>
9
 
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
10
 
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
11
 
</head>
12
 
<body bgcolor=white>
13
 
<a name="2"><!--meow--></a>
14
 
<table width="100%"><tr valign=top>
15
 
<td>
16
 
<h1>DB-&gt;rename</h1>
17
 
</td>
18
 
<td align=right>
19
 
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
20
 
</td></tr></table>
21
 
<hr size=1 noshade>
22
 
<tt>
23
 
<h3><pre>
24
 
#include &lt;db.h&gt;
25
 
<p>
26
 
int
27
 
DB-&gt;rename(DB *db, const char *file,
28
 
    const char *database, const char *newname, u_int32_t flags);
29
 
</pre></h3>
30
 
<h1>Description</h1>
31
 
<p>The DB-&gt;rename method renames the database specified by the
32
 
<b>file</b> and <b>database</b> arguments to <b>newname</b>.  If no
33
 
<b>database</b> is specified, the underlying file represented by
34
 
<b>file</b> is renamed, incidentally renaming all databases that it
35
 
contained.
36
 
<p>Applications should not rename databases that are currently in use.  If
37
 
an underlying file is being renamed and logging is currently enabled in
38
 
the database environment, no database in the file may be open when the
39
 
DB-&gt;rename method is called.  In particular, some architectures do
40
 
not permit renaming files with open handles.  On these architectures,
41
 
attempts to rename databases that are currently in use by any thread of
42
 
control in the system will fail.
43
 
<p>The <b>flags</b> parameter is currently unused, and must be set to 0.
44
 
<p>The <a href="../api_c/db_class.html">DB</a> handle may not be accessed again after DB-&gt;rename is
45
 
called, regardless of its return.
46
 
<p>The DB-&gt;rename method returns a non-zero error value on failure and 0 on success.
47
 
<h1>Environment Variables</h1>
48
 
<p><dl compact>
49
 
<p><dt>DB_HOME<dd>If a <b>dbenv</b> argument to <a href="../api_c/db_create.html">db_create</a> was specified, the
50
 
environment variable <b>DB_HOME</b> may be used as the path of the
51
 
database environment home.
52
 
<p>DB-&gt;rename is affected by any database directory specified using the
53
 
<a href="../api_c/env_set_data_dir.html">DB_ENV-&gt;set_data_dir</a> method, or by setting the "set_data_dir" string
54
 
in the environment's <b>DB_CONFIG</b> file.
55
 
</dl>
56
 
<h1>Errors</h1>
57
 
<p>The DB-&gt;rename method may fail and return a non-zero error for the following conditions:
58
 
<p><dl compact>
59
 
<p><dt>EINVAL<dd>An invalid flag value or parameter was specified.
60
 
<p>A database in the file is currently open.
61
 
<p>Called after <a href="../api_c/db_open.html">DB-&gt;open</a> was called.
62
 
</dl>
63
 
<p>The DB-&gt;rename method may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions.
64
 
If a catastrophic error has occurred, the DB-&gt;rename method may fail and
65
 
return <a href="../ref/program/errorret.html#DB_RUNRECOVERY">DB_RUNRECOVERY</a>,
66
 
in which case all subsequent Berkeley DB calls will fail in the same way.
67
 
<h1>Class</h1>
68
 
<a href="../api_c/db_class.html">DB</a>
69
 
<h1>See Also</h1>
70
 
<a href="../api_c/db_list.html">Databases and Related Methods</a>
71
 
</tt>
72
 
<table width="100%"><tr><td><br></td><td align=right>
73
 
<a href="../api_c/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
74
 
</td></tr></table>
75
 
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
76
 
</body>
77
 
</html>