mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
69 lines
4.8 KiB
HTML
69 lines
4.8 KiB
HTML
|
<!--$Id: dbenv.so,v 11.9 2000/03/18 21:43:20 bostic Exp $-->
|
||
|
<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.-->
|
||
|
<!--All rights reserved.-->
|
||
|
<html>
|
||
|
<head>
|
||
|
<title>Berkeley DB Reference Guide: Release 3.0: the DB_ENV structure</title>
|
||
|
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||
|
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
|
||
|
</head>
|
||
|
<body bgcolor=white>
|
||
|
<table><tr valign=top>
|
||
|
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Upgrading Berkeley DB Applications</dl></h3></td>
|
||
|
<td width="1%"><a href="../../ref/upgrade.3.0/func.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/upgrade.3.0/open.html"><img src="../../images/next.gif" alt="Next"></a>
|
||
|
</td></tr></table>
|
||
|
<p>
|
||
|
<h1 align=center>Release 3.0: the DB_ENV structure</h1>
|
||
|
<p>The DB_ENV structure is now opaque for applications in the Berkeley DB
|
||
|
3.0 release. Accesses to any fields within that structure by the
|
||
|
application should be replaced with method calls. The following example
|
||
|
illustrates this using the historic errpfx structure field. In the Berkeley DB
|
||
|
2.X releases, applications set error prefixes using code similar to the
|
||
|
following:
|
||
|
<p><blockquote><pre>DB_ENV *dbenv;
|
||
|
<p>
|
||
|
dbenv->errpfx = "my prefix";</pre></blockquote>
|
||
|
<p>in the Berkeley DB 3.X releases, this should be done using the
|
||
|
<a href="../../api_c/env_set_errpfx.html">DBENV->set_errpfx</a> method, as follows:
|
||
|
<p><blockquote><pre>DB_ENV *dbenv;
|
||
|
<p>
|
||
|
dbenv->set_errpfx(dbenv, "my prefix");</pre></blockquote>
|
||
|
<p>The following table lists the DB_ENV fields previously used by
|
||
|
applications and the methods that should now be used to set them.
|
||
|
<p><table border=1 align=center>
|
||
|
<tr><th>DB_ENV field</th><th>Berkeley DB 3.X method</th></tr>
|
||
|
<tr><td>db_errcall</td><td><a href="../../api_c/env_set_errcall.html">DBENV->set_errcall</a></td></tr>
|
||
|
<tr><td>db_errfile</td><td><a href="../../api_c/env_set_errfile.html">DBENV->set_errfile</a></td></tr>
|
||
|
<tr><td>db_errpfx</td><td><a href="../../api_c/env_set_errpfx.html">DBENV->set_errpfx</a></td></tr>
|
||
|
<tr><td>db_lorder</td><td>This field was removed from the DB_ENV structure in the Berkeley DB
|
||
|
3.0 release as no application should have ever used it. Any code using
|
||
|
it should be evaluated for potential bugs.</td></tr>
|
||
|
<tr><td>db_paniccall</td><td><a href="../../api_c/env_set_paniccall.html">DBENV->set_paniccall</a></td></tr>
|
||
|
<tr><td>db_verbose</td><td><a href="../../api_c/env_set_verbose.html">DBENV->set_verbose</a>
|
||
|
<p>Note: the db_verbose field was a simple boolean toggle, the
|
||
|
<a href="../../api_c/env_set_verbose.html">DBENV->set_verbose</a> method takes arguments that specify exactly
|
||
|
which verbose messages are desired.</td></tr>
|
||
|
<tr><td>lg_max</td><td><a href="../../api_c/env_set_lg_max.html">DBENV->set_lg_max</a></td></tr>
|
||
|
<tr><td>lk_conflicts</td><td><a href="../../api_c/env_set_lk_conflicts.html">DBENV->set_lk_conflicts</a></td></tr>
|
||
|
<tr><td>lk_detect</td><td><a href="../../api_c/env_set_lk_detect.html">DBENV->set_lk_detect</a></td></tr>
|
||
|
<tr><td>lk_max</td><td><a href="../../api_c/env_set_lk_max.html">DBENV->set_lk_max</a></td></tr>
|
||
|
<tr><td>lk_modes</td><td><a href="../../api_c/env_set_lk_conflicts.html">DBENV->set_lk_conflicts</a></td></tr>
|
||
|
<tr><td>mp_mmapsize</td><td><a href="../../api_c/env_set_mp_mmapsize.html">DBENV->set_mp_mmapsize</a></td></tr>
|
||
|
<tr><td>mp_size</td><td><a href="../../api_c/env_set_cachesize.html">DBENV->set_cachesize</a>
|
||
|
<p>Note: the <a href="../../api_c/env_set_cachesize.html">DBENV->set_cachesize</a> function takes additional arguments.
|
||
|
Setting both the second argument (the number of GB in the pool) and the
|
||
|
last argument (the number of memory pools to create) to 0 will result in
|
||
|
behavior that is backward compatible with previous Berkeley DB releases.</td></tr>
|
||
|
<tr><td>tx_info</td><td>This field was used by applications as an argument to the transaction
|
||
|
subsystem functions. As those functions take references to a
|
||
|
DB_ENV structure as arguments in the Berkeley DB 3.0 release, it should
|
||
|
no longer be used by any application.</td></tr>
|
||
|
<tr><td>tx_max</td><td><a href="../../api_c/env_set_tx_max.html">DBENV->set_tx_max</a></td></tr>
|
||
|
<tr><td>tx_recover</td><td><a href="../../api_c/env_set_tx_recover.html">DBENV->set_tx_recover</a></td></tr>
|
||
|
</table>
|
||
|
<table><tr><td><br></td><td width="1%"><a href="../../ref/upgrade.3.0/func.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/upgrade.3.0/open.html"><img src="../../images/next.gif" alt="Next"></a>
|
||
|
</td></tr></table>
|
||
|
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
|
||
|
</body>
|
||
|
</html>
|