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

« back to all changes in this revision

Viewing changes to libdb/docs/ref/upgrade.3.0/dbinfo.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.10.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 128.
  • Revision ID: james.westby@ubuntu.com-20100517170206-xu1wmjuy40nt2sk0
Tags: upstream-2.30.1
ImportĀ upstreamĀ versionĀ 2.30.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!--$Id$-->
2
 
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
 
<!--All rights reserved.-->
4
 
<!--See the file LICENSE for redistribution information.-->
5
 
<html>
6
 
<head>
7
 
<title>Berkeley DB Reference Guide: Release 3.0: the DBINFO structure</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
 
<table width="100%"><tr valign=top>
13
 
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Upgrading Berkeley DB Applications</dl></h3></td>
14
 
<td align=right><a href="../../ref/upgrade.3.0/db.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/upgrade.3.0/join.html"><img src="../../images/next.gif" alt="Next"></a>
15
 
</td></tr></table>
16
 
<p>
17
 
<h1 align=center>Release 3.0: the DBINFO structure</h1>
18
 
<p>The DB_INFO structure has been removed from the Berkeley DB 3.0 release.
19
 
Accesses to any fields within that structure by the application should be
20
 
replaced with method calls on the <a href="../../api_c/db_class.html">DB</a> handle.  The following
21
 
example illustrates this using the historic db_cachesize structure field.
22
 
In the Berkeley DB 2.X releases, applications could set the size of an
23
 
underlying database cache using code similar to the following:
24
 
<p><blockquote><pre>DB_INFO dbinfo;
25
 
<p>
26
 
        memset(dbinfo, 0, sizeof(dbinfo));
27
 
        dbinfo.db_cachesize = 1024 * 1024;</pre></blockquote>
28
 
<p>in the Berkeley DB 3.X releases, this should be done using the
29
 
<a href="../../api_c/db_set_cachesize.html">DB-&gt;set_cachesize</a> method, as follows:
30
 
<p><blockquote><pre>DB *db;
31
 
int ret;
32
 
<p>
33
 
        ret = db-&gt;set_cachesize(db, 0, 1024 * 1024, 0);</pre></blockquote>
34
 
<p>The DB_INFO structure is no longer used in any way by the Berkeley DB 3.0
35
 
release, and should be removed from the application.
36
 
<p>The following table lists the DB_INFO fields previously used by
37
 
applications and the methods that should now be used to set
38
 
them.  Because these calls provide configuration for the
39
 
database open, they must precede the call to <a href="../../api_c/db_open.html">DB-&gt;open</a>.
40
 
Calling them after the call to <a href="../../api_c/db_open.html">DB-&gt;open</a> will return an
41
 
error.
42
 
<p><table border=1 align=center>
43
 
<tr><th>DB_INFO field</th><th>Berkeley DB 3.X method</th></tr>
44
 
<tr><td>bt_compare</td><td><a href="../../api_c/db_set_bt_compare.html">DB-&gt;set_bt_compare</a></td></tr>
45
 
<tr><td>bt_minkey</td><td><a href="../../api_c/db_set_bt_minkey.html">DB-&gt;set_bt_minkey</a></td></tr>
46
 
<tr><td>bt_prefix</td><td><a href="../../api_c/db_set_bt_prefix.html">DB-&gt;set_bt_prefix</a></td></tr>
47
 
<tr><td>db_cachesize</td><td><a href="../../api_c/db_set_cachesize.html">DB-&gt;set_cachesize</a>
48
 
<p>Note: the <a href="../../api_c/db_set_cachesize.html">DB-&gt;set_cachesize</a> function takes additional arguments.
49
 
Setting both the second argument (the number of GB in the pool) and the
50
 
last argument (the number of memory pools to create) to 0 will result in
51
 
behavior that is backward-compatible with previous Berkeley DB releases.</td></tr>
52
 
<tr><td>db_lorder</td><td><a href="../../api_c/db_set_lorder.html">DB-&gt;set_lorder</a></td></tr>
53
 
<tr><td>db_malloc</td><td>DB-&gt;set_malloc</td></tr>
54
 
<tr><td>db_pagesize</td><td><a href="../../api_c/db_set_pagesize.html">DB-&gt;set_pagesize</a></td></tr>
55
 
<tr><td>dup_compare</td><td><a href="../../api_c/db_set_dup_compare.html">DB-&gt;set_dup_compare</a></td></tr>
56
 
<tr><td>flags</td><td><a href="../../api_c/db_set_flags.html">DB-&gt;set_flags</a>
57
 
<p>Note: the DB_DELIMITER, DB_FIXEDLEN and DB_PAD flags no longer need to be
58
 
set as there are specific methods off the <a href="../../api_c/db_class.html">DB</a> handle that set the
59
 
file delimiter, the length of fixed-length records and the fixed-length
60
 
record pad character.  They should simply be discarded from the application.</td></tr>
61
 
<tr><td>h_ffactor</td><td><a href="../../api_c/db_set_h_ffactor.html">DB-&gt;set_h_ffactor</a></td></tr>
62
 
<tr><td>h_hash</td><td><a href="../../api_c/db_set_h_hash.html">DB-&gt;set_h_hash</a></td></tr>
63
 
<tr><td>h_nelem</td><td><a href="../../api_c/db_set_h_nelem.html">DB-&gt;set_h_nelem</a></td></tr>
64
 
<tr><td>re_delim</td><td><a href="../../api_c/db_set_re_delim.html">DB-&gt;set_re_delim</a></td></tr>
65
 
<tr><td>re_len</td><td><a href="../../api_c/db_set_re_len.html">DB-&gt;set_re_len</a></td></tr>
66
 
<tr><td>re_pad</td><td><a href="../../api_c/db_set_re_pad.html">DB-&gt;set_re_pad</a></td></tr>
67
 
<tr><td>re_source</td><td><a href="../../api_c/db_set_re_source.html">DB-&gt;set_re_source</a></td></tr>
68
 
</table>
69
 
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/upgrade.3.0/db.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/upgrade.3.0/join.html"><img src="../../images/next.gif" alt="Next"></a>
70
 
</td></tr></table>
71
 
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
72
 
</body>
73
 
</html>