Simply append the data to the end of the database, treating the database
+
+- DB_APPEND
- Simply append the data to the end of the database, treating the database
much like a simple log. This flag is only valid for the Queue and Recno
access methods.
-
- DB_NOOVERWRITE
- Only store the data item if the key does not already appear in the database.
+
- DB_NOOVERWRITE
- Only store the data item if the key does not already appear in the database.
If the database has been configured to support duplicate records, the
DB->put method will add the new data value at the end of the duplicate
@@ -32,6 +32,6 @@ set. If the database supports sorted duplicates, the new data value is
inserted at the correct sorted location.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am/second.html b/db/docs/ref/am/second.html
index 850144b76..169a974e8 100644
--- a/db/docs/ref/am/second.html
+++ b/db/docs/ref/am/second.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Secondary indices
-
+
@@ -36,7 +36,8 @@ a secondary index in which the secondary key was this last name.
CREATE TABLE students(student_id CHAR(4) NOT NULL,
lastname CHAR(15), firstname CHAR(15), PRIMARY KEY(student_id));
CREATE INDEX lname ON students(lastname);
-In Berkeley DB, this would work as follows:
+In Berkeley DB, this would work as follows (a
+Java API example is also available):
struct student_record {
char student_id[4];
char last_name[15];
@@ -213,6 +214,6 @@ a new database handle and the DB->remove
secondary database handles associated with it.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am/second.javas b/db/docs/ref/am/second.javas
new file mode 100644
index 000000000..bb96a7bc5
--- /dev/null
+++ b/db/docs/ref/am/second.javas
@@ -0,0 +1,156 @@
+/*-
+ * Copyright (c) 2002
+ * Sleepycat Software. All rights reserved.
+ *
+ * $Id: second.javas,v 10.1 2004/09/15 19:40:07 bostic Exp $
+ */
+package com.sleepycat.examples;
+
+import com.sleepycat.db.*;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.io.PrintStream;
+
+class SecondaryExample
+{
+ private static final String progname = "SecondaryExample";
+ private static final String DATABASE_HOME = "TESTDIR";
+
+ public static void main(String[] args)
+ {
+ try {
+ SecondaryExample app = new SecondaryExample();
+ app.run();
+ } catch(Exception e) {
+ System.err.println(progname + ": " + e);
+ e.printStackTrace(System.err);
+ System.exit(1);
+ }
+ }
+
+ void run() throws DbException, FileNotFoundException
+ {
+ DbEnv dbenv = new DbEnv(0);
+
+ /* Open the environment. */
+ dbenv.open(DATABASE_HOME,
+ Db.DB_CREATE | Db.DB_INIT_LOCK | Db.DB_INIT_LOG |
+ Db.DB_INIT_MPOOL | Db.DB_INIT_TXN, 0);
+
+ try {
+ run_app(dbenv);
+ } finally {
+ dbenv.close(0);
+ }
+ }
+
+ private void run_app(DbEnv dbenv)
+ throws DbException, FileNotFoundException
+ {
+ Db dbp, sdbp;
+ Dbt key, pkey, skey, data;
+ StudentRecord srec;
+
+ /* Open/create primary */
+ dbp = new Db(dbenv, 0);
+ dbp.open(null, "students.db", null, Db.DB_BTREE, Db.DB_CREATE,
+ 0600);
+
+ /*
+ * Open/create secondary. Note that it supports duplicate data
+ * items, since last names might not be unique.
+ */
+ sdbp = new Db(dbenv, 0);
+ sdbp.set_flags(Db.DB_DUP | Db.DB_DUPSORT);
+ sdbp.open(null, "lastname.db", null, Db.DB_BTREE, Db.DB_CREATE,
+ 0600);
+
+ try {
+ /* Associate the secondary with the primary. */
+ dbp.associate(sdbp, new GetName(), 0);
+
+ /* Add a new record */
+ key = new Dbt();
+ key.set_data("WC42".getBytes());
+ key.set_size(4);
+ srec = new StudentRecord();
+ srec.student_id = "WC42";
+ srec.last_name = "Churchill ";
+ srec.first_name = "Winston ";
+ data = new Dbt();
+ srec.encode(data);
+
+ System.out.println("Adding a record with primary key " +
+ new String(key.get_data()) + " and secondary key " +
+ srec.last_name);
+ dbp.put(null, key, data, 0);
+
+ /* Now do a lookup */
+ skey = new Dbt();
+ pkey = new Dbt();
+ data = new Dbt();
+ skey.set_data("Churchill ".getBytes());
+ skey.set_size(15);
+ System.out.println("Searching with secondary key " +
+ new String(skey.get_data()));
+ sdbp.pget(null, skey, pkey, data, 0);
+
+ System.out.println("Found a record with primary key " +
+ new String(pkey.get_data()));
+ } finally {
+ dbp.close(0);
+ sdbp.close(0);
+ }
+ }
+
+ /*
+ * getname -- extracts a secondary key (the last name) from a primary
+ * key/data pair
+ */
+ class GetName implements DbSecondaryKeyCreate {
+ public int secondary_key_create(Db secondary,
+ Dbt pkey, Dbt pdata, Dbt skey) {
+ StudentRecord srec = new StudentRecord();
+ srec.decode(pdata);
+
+ // Make a fixed-length array of last_name
+ byte[] last_name_data = srec.last_name.getBytes();
+ byte[] last_name_raw = new byte[15];
+ System.arraycopy(last_name_data, 0, last_name_raw, 0,
+ last_name_data.length);
+
+ skey.set_data(last_name_raw);
+ skey.set_size(last_name_raw.length);
+ return (0);
+ }
+ }
+
+ class StudentRecord
+ {
+ String student_id; // assumed to be 4 bytes long
+ String last_name; // assumed to be 15 bytes long
+ String first_name; // assumed to be 15 bytes long
+
+ void decode(Dbt dbt) {
+ byte[] data = dbt.get_data();
+ student_id = new String(data, 0, 4);
+ last_name = new String(data, 4, 15);
+ first_name = new String(data, 19, 15);
+ }
+
+ void encode(Dbt dbt) {
+ byte[] data = new byte[34];
+ System.arraycopy(student_id.getBytes(), 0, data, 0, 4);
+ byte[] last_name_raw = last_name.getBytes();
+ System.arraycopy(last_name_raw, 0, data, 4,
+ last_name_raw.length);
+ byte[] first_name_raw = first_name.getBytes();
+ System.arraycopy(first_name_raw, 0, data, 19,
+ first_name_raw.length);
+ dbt.set_data(data);
+ dbt.set_size(data.length);
+ }
+ }
+}
diff --git a/db/docs/ref/am/stat.html b/db/docs/ref/am/stat.html
index 2a655278a..a1864b61d 100644
--- a/db/docs/ref/am/stat.html
+++ b/db/docs/ref/am/stat.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Database statistics
-
+
@@ -20,12 +20,12 @@
database, for example, the number of key/data pairs in the database, how
the database was originally configured, and so on.
There is one flag you can set to customize the returned statistics:
-
-- DB_FAST_STAT
- Return only information that can be acquired without traversing the
+
+- DB_FAST_STAT
- Return only information that can be acquired without traversing the
entire database.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am/sync.html b/db/docs/ref/am/sync.html
index b36c7f2d3..22441f8b6 100644
--- a/db/docs/ref/am/sync.html
+++ b/db/docs/ref/am/sync.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Flushing the database cache
-
+
@@ -34,6 +34,6 @@ atomically replace the original database with the updated copy.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am/truncate.html b/db/docs/ref/am/truncate.html
index fe4eecd77..cd51aa52d 100644
--- a/db/docs/ref/am/truncate.html
+++ b/db/docs/ref/am/truncate.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Database truncation
-
+
@@ -19,6 +19,6 @@
The DB->truncate method empties a database of all records.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am/upgrade.html b/db/docs/ref/am/upgrade.html
index 37da05527..f6b0ce882 100644
--- a/db/docs/ref/am/upgrade.html
+++ b/db/docs/ref/am/upgrade.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Database upgrade
-
+
@@ -46,6 +46,6 @@ appropriate copies of their application or application sources if they
may need to access archived databases without first upgrading them.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am/verify.html b/db/docs/ref/am/verify.html
index ab467affb..d4958ce6a 100644
--- a/db/docs/ref/am/verify.html
+++ b/db/docs/ref/am/verify.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Database verification and salvage
-
+
@@ -46,6 +46,6 @@ preferable to any kind of data loss.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/bt_compare.html b/db/docs/ref/am_conf/bt_compare.html
index 0f9453f8b..8173dd75f 100644
--- a/db/docs/ref/am_conf/bt_compare.html
+++ b/db/docs/ref/am_conf/bt_compare.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Btree comparison
-
+
@@ -76,9 +76,7 @@ compare_dbt(dbp, a, b)
well-ordered. The most important implication of being well-ordered is
that the key relations must be transitive, that is, if key A is less
than key B, and key B is less than key C, then the comparison routine
-must also return that key A is less than key C. In addition, comparisons
-will only be able to return 0 when comparing full length keys; partial
-key comparisons must always return a result less than or greater than 0.
+must also return that key A is less than key C.
It is reasonable for a comparison function to not examine an entire key
in some applications, which implies that partial keys may be specified
to the Berkeley DB interfaces. When partial keys are specified to Berkeley DB,
@@ -89,6 +87,6 @@ key stored in the database. The actual key can be retrieved by calling
the DBcursor->c_get method with the DB_CURRENT flag.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/bt_minkey.html b/db/docs/ref/am_conf/bt_minkey.html
index 1ad0d403f..2ca2eed2f 100644
--- a/db/docs/ref/am_conf/bt_minkey.html
+++ b/db/docs/ref/am_conf/bt_minkey.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Minimum keys per page
-
+
@@ -49,6 +49,6 @@ value incorrectly can result in overusing overflow pages and decreasing
the application's overall performance.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/bt_prefix.html b/db/docs/ref/am_conf/bt_prefix.html
index 7d5ec1f74..b22d9c2a0 100644
--- a/db/docs/ref/am_conf/bt_prefix.html
+++ b/db/docs/ref/am_conf/bt_prefix.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Btree prefix comparison
-
+
@@ -27,13 +27,15 @@ comparison function of the Btree, since what distinguishes any two keys
depends entirely on the function used to compare them. This means that
if a prefix comparison routine is specified by the application, a
compatible overall comparison routine must also have been specified.
-Prefix comparison routines are passed pointers to keys as arguments. The
-keys are represented as DBT structures. The prefix comparison
-function must return the number of bytes of the second key argument that
-are necessary to determine if it is greater than the first key argument.
-If the keys are equal, the length of the second key should be returned.
-The only fields that the routines may examine in the DBT
-structures are data and size fields.
+Prefix comparison routines are passed pointers to keys as arguments.
+The keys are represented as DBT structures. The only fields
+the routines may examine in the DBT structures are data
+and size fields.
+The prefix comparison function must return the number of bytes necessary
+to distinguish the two keys. If the keys are identical (equal and equal
+in length), the length should be returned. If the keys are equal up to
+the smaller of the two lengths, then the length of the smaller key plus
+1 should be returned.
An example prefix comparison routine follows:
u_int32_t
compare_prefix(dbp, a, b)
@@ -63,6 +65,6 @@ compare_prefix(dbp, a, b)
sets can produce significantly reduced tree sizes and faster search times.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/bt_recnum.html b/db/docs/ref/am_conf/bt_recnum.html
index f1953b923..6003b102f 100644
--- a/db/docs/ref/am_conf/bt_recnum.html
+++ b/db/docs/ref/am_conf/bt_recnum.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Retrieving Btree records by logical record number
-
+
@@ -101,6 +101,6 @@ err: /* Close the cursor. */
}
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/byteorder.html b/db/docs/ref/am_conf/byteorder.html
index bb305f7a3..f0ee13f84 100644
--- a/db/docs/ref/am_conf/byteorder.html
+++ b/db/docs/ref/am_conf/byteorder.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Selecting a byte order
-
+
@@ -33,6 +33,6 @@ exactly as they were written when retrieved on a big-endian format
architecture.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/cachesize.html b/db/docs/ref/am_conf/cachesize.html
index c24e04337..6b0e5ea4a 100644
--- a/db/docs/ref/am_conf/cachesize.html
+++ b/db/docs/ref/am_conf/cachesize.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Selecting a cache size
-
+
@@ -81,6 +81,6 @@ means that the cache is working well, yielding a 97% cache hit rate. The
as a whole and for each file within the cache separately.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/dup.html b/db/docs/ref/am_conf/dup.html
index ec6ffd7a5..c343a7bc5 100644
--- a/db/docs/ref/am_conf/dup.html
+++ b/db/docs/ref/am_conf/dup.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Duplicate data items
-
+
@@ -70,6 +70,6 @@ presence of duplicates (sorted or not), see the DB->put, DBcursor->c_get and DBcursor->c_put documentation.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/extentsize.html b/db/docs/ref/am_conf/extentsize.html
index 595e27ad2..de7603608 100644
--- a/db/docs/ref/am_conf/extentsize.html
+++ b/db/docs/ref/am_conf/extentsize.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Selecting a Queue extent size
-
+
@@ -39,6 +39,6 @@ many files, all those files will need to be open at the same time,
consuming system and process file resources.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/h_ffactor.html b/db/docs/ref/am_conf/h_ffactor.html
index f8720544f..6ca6b339c 100644
--- a/db/docs/ref/am_conf/h_ffactor.html
+++ b/db/docs/ref/am_conf/h_ffactor.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Page fill factor
-
+
@@ -27,6 +27,6 @@ the DB->set_h_ffactor method.
be selected dynamically as pages are filled.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/h_hash.html b/db/docs/ref/am_conf/h_hash.html
index b0ee1f639..5c4751f03 100644
--- a/db/docs/ref/am_conf/h_hash.html
+++ b/db/docs/ref/am_conf/h_hash.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Specifying a database hash
-
+
@@ -35,6 +35,6 @@ take a reference to a DB object, a point
its length, as arguments and return an unsigned, 32-bit hash value.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/h_nelem.html b/db/docs/ref/am_conf/h_nelem.html
index 0b6346c27..94d6176db 100644
--- a/db/docs/ref/am_conf/h_nelem.html
+++ b/db/docs/ref/am_conf/h_nelem.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Hash table size
-
+
@@ -28,6 +28,6 @@ of elements to be a useful value to Berkeley DB, the
|
|
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+
Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/intro.html b/db/docs/ref/am_conf/intro.html
index 5e34912c0..2f8139cf7 100644
--- a/db/docs/ref/am_conf/intro.html
+++ b/db/docs/ref/am_conf/intro.html
@@ -1,18 +1,18 @@
-
-
+
+
Berkeley DB Reference Guide: What are the available access methods?
-
+
- Berkeley DB Reference Guide:
- Access Methods
|
-
+ |
|
What are the available access methods?
@@ -39,8 +39,8 @@ the head of the queue. The Queue access method uses record level locking.
The Recno access method stores both fixed and variable-length records with
logical record numbers as keys, optionally backed by a flat text (byte
stream) file.
-
|
+
- Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/logrec.html b/db/docs/ref/am_conf/logrec.html
index c1ca82a5d..a273c6d63 100644
--- a/db/docs/ref/am_conf/logrec.html
+++ b/db/docs/ref/am_conf/logrec.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Logical record numbers
-
+
@@ -30,11 +30,6 @@ The db_recno_t type is a 32-bit unsigned type, which limits the
number of logical records in a Queue or Recno database, and the maximum
logical record which may be directly retrieved from a Btree database,
to 4,294,967,295.
-Record numbers in Queue databases wrap around. When the tail of the
-queue reaches the maximum record number, the next record appended will
-be given record number 1. If the head of the queue ever catches up to
-the tail of the queue, the Berkeley DB methods will return the system error
-EFBIG.
Record numbers in Recno databases can be configured to run in either
mutable or fixed mode: mutable, where logical record numbers change as
records are deleted or inserted, and fixed, where record numbers never
@@ -45,6 +40,12 @@ as records are deleted or inserted, the logical record number for other
records in the database can change. See
Logically renumbering records
for more information.
+When appending new data items into Queue databases, record numbers wrap
+around. When the tail of the queue reaches the maximum record number,
+the next record appended will be given record number 1. If the head of
+the queue ever catches up to the tail of the queue, Berkeley DB will return
+the system error EFBIG. Record numbers do not wrap around when appending
+new data items into Recno databases.
Configuring Btree databases to support record numbers can severely limit
the throughput of applications with multiple concurrent threads writing
the database, because locations used to store record counts often become
@@ -118,6 +119,6 @@ recno_build(dbp)
}
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/malloc.html b/db/docs/ref/am_conf/malloc.html
index 8f1aed123..c8dad08f8 100644
--- a/db/docs/ref/am_conf/malloc.html
+++ b/db/docs/ref/am_conf/malloc.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Non-local memory allocation
-
+
@@ -28,6 +28,6 @@ uses to free it, or vice versa. To avoid this problem, the
give Berkeley DB references to the application's allocation routines.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/pagesize.html b/db/docs/ref/am_conf/pagesize.html
index 1a6002c25..2772543c8 100644
--- a/db/docs/ref/am_conf/pagesize.html
+++ b/db/docs/ref/am_conf/pagesize.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Selecting a page size
-
+
@@ -73,6 +73,6 @@ from which your database can recover See
information.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/re_source.html b/db/docs/ref/am_conf/re_source.html
index 7d525e5de..5e64cbcec 100644
--- a/db/docs/ref/am_conf/re_source.html
+++ b/db/docs/ref/am_conf/re_source.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Flat-text backing files
-
+
@@ -58,6 +58,6 @@ are either generated on the fly by software tools, or modified using a
different mechanism such as a text editor.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/recno.html b/db/docs/ref/am_conf/recno.html
index d2281a9a4..0d14433bf 100644
--- a/db/docs/ref/am_conf/recno.html
+++ b/db/docs/ref/am_conf/recno.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Managing record-based databases
-
+
@@ -65,6 +65,6 @@ files, see Flat-text backing
files.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/renumber.html b/db/docs/ref/am_conf/renumber.html
index 82c307581..a990d540a 100644
--- a/db/docs/ref/am_conf/renumber.html
+++ b/db/docs/ref/am_conf/renumber.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Logically renumbering records
-
+
@@ -76,6 +76,6 @@ record by its record number will also result in the
|
|
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_conf/select.html b/db/docs/ref/am_conf/select.html
index 4eb01fb4f..f72200675 100644
--- a/db/docs/ref/am_conf/select.html
+++ b/db/docs/ref/am_conf/select.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Selecting an access method
-
+
@@ -113,6 +113,6 @@ permanent storage is a flat text file and the database is used as a fast,
temporary storage area while the data is being read or modified.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_misc/align.html b/db/docs/ref/am_misc/align.html
index 7daceaac6..80f59224c 100644
--- a/db/docs/ref/am_misc/align.html
+++ b/db/docs/ref/am_misc/align.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Data alignment
-
+
@@ -24,6 +24,6 @@ any necessary alignment. The
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_misc/dbsizes.html b/db/docs/ref/am_misc/dbsizes.html
index 732535f4c..f0cc71a22 100644
--- a/db/docs/ref/am_misc/dbsizes.html
+++ b/db/docs/ref/am_misc/dbsizes.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Database limits
-
+
@@ -27,20 +27,21 @@ maximum database size of 241 (2 terabytes).
if the host system does not have filesystem support for files larger than
232, including the ability to seek to absolute offsets within
those files.
-The largest key or data item that Berkeley DB can support is largely limited
-by available memory. Specifically, while key and data byte strings may
-be of essentially unlimited length, any one of them must fit into
-available memory so that it can be returned to the application. As some
-of the Berkeley DB interfaces return both key and data items to the application,
-those interfaces will require that any key/data pair fit simultaneously
-into memory. Further, as the access methods may need to compare key and
-data items with other key and data items, it may be a requirement that
-any two key or two data items fit into available memory. Finally, when
-writing applications supporting transactions, it may be necessary to have
-an additional copy of any data item in memory for logging purposes.
+The largest key or data item that Berkeley DB can support is 232,
+or more likely by available memory. Specifically, while key and data
+byte strings may be of essentially unlimited length, any one of them
+must fit into available memory so that it can be returned to the
+application. As some of the Berkeley DB interfaces return both key and data
+items to the application, those interfaces will require that any
+key/data pair fit simultaneously into memory. Further, as the access
+methods may need to compare key and data items with other key and data
+items, it may be a requirement that any two key or two data items fit
+into available memory. Finally, when writing applications supporting
+transactions, it may be necessary to have an additional copy of any data
+item in memory for logging purposes.
The maximum Btree depth is 255.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_misc/diskspace.html b/db/docs/ref/am_misc/diskspace.html
index 6c9d693d0..b66906c72 100644
--- a/db/docs/ref/am_misc/diskspace.html
+++ b/db/docs/ref/am_misc/diskspace.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Disk space requirements
-
+
@@ -144,6 +144,6 @@ only at specific points in the file, and this too can lead to sparse hash
tables.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_misc/error.html b/db/docs/ref/am_misc/error.html
index d92d4766c..575e33d77 100644
--- a/db/docs/ref/am_misc/error.html
+++ b/db/docs/ref/am_misc/error.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Error support
-
+
@@ -58,6 +58,6 @@ an EACCESS system error, the error messages shown would appear as follows:
my_app: contact your system administrator: session ID was 14
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_misc/faq.html b/db/docs/ref/am_misc/faq.html
index 760aca14c..08d988ff1 100644
--- a/db/docs/ref/am_misc/faq.html
+++ b/db/docs/ref/am_misc/faq.html
@@ -1,18 +1,18 @@
-
-
+
+
Berkeley DB Reference Guide: Access method FAQ
-
+
- Berkeley DB Reference Guide:
- Access Methods
|
-
+ |
|
Access method FAQ
@@ -124,8 +124,8 @@ to take the first argument to the callback function and cast it to a
MyDb (in C++, cast it to (MyDb*)). That will allow you to access your
data members or methods.
-
|
+
- Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_misc/get_bulk.html b/db/docs/ref/am_misc/get_bulk.html
index 434cea707..bbd94ba70 100644
--- a/db/docs/ref/am_misc/get_bulk.html
+++ b/db/docs/ref/am_misc/get_bulk.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Retrieving records in bulk
-
+
@@ -42,12 +42,9 @@ This is implemented for the C and C++ APIs using four macros:
DB_MULTIPLE_INIT, DB_MULTIPLE_NEXT,
DB_MULTIPLE_KEY_NEXT, and DB_MULTIPLE_RECNO_NEXT. For
the Java API, this is implemented as three iterator classes:
-DbMultipleDataIterator
-,
-DbMultipleKeyDataIterator
-, and
-DbMultipleRecnoDataIterator
-.
+MultipleDataEntry,
+MultipleKeyDataEntry, and
+MultipleRecnoDataEntry.
The DB_MULTIPLE_INIT macro is always called first. It
initializes a local application variable and the data
DBT for stepping through the set of returned records. Then,
@@ -102,8 +99,8 @@ rec_display(dbp)
/*
* Acquire the next set of key/data pairs. This code does
* not handle single key/data pairs that won't fit in a
- * BUFFER_LENGTH size buffer, instead returning ENOMEM to
- * our caller.
+ * BUFFER_LENGTH size buffer, instead returning DB_BUFFER_SMALL
+ * to our caller.
*/
if ((ret = dbcp->c_get(dbcp,
&key, &data, DB_MULTIPLE_KEY | DB_NEXT)) != 0) {
@@ -134,6 +131,6 @@ rec_display(dbp)
}
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_misc/partial.html b/db/docs/ref/am_misc/partial.html
index d8c8896ba..80b604495 100644
--- a/db/docs/ref/am_misc/partial.html
+++ b/db/docs/ref/am_misc/partial.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Partial record storage and retrieval
-
+
@@ -129,6 +129,6 @@ ABCDEFGHIJ0123456789 -> ABCDEFGHIJ0123456789\0\0\0\0\0abcdefghij
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_misc/perm.html b/db/docs/ref/am_misc/perm.html
index e713c1abd..58902350c 100644
--- a/db/docs/ref/am_misc/perm.html
+++ b/db/docs/ref/am_misc/perm.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Retrieved key/data permanence for C/C++
-
+
@@ -32,6 +32,6 @@ pointer stored into the DBT refers is o
call to Berkeley DB using the DBC handle returned by DB->cursor.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_misc/stability.html b/db/docs/ref/am_misc/stability.html
index e2a7fafe1..b4bb1e9d7 100644
--- a/db/docs/ref/am_misc/stability.html
+++ b/db/docs/ref/am_misc/stability.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Cursor stability
-
+
@@ -38,7 +38,9 @@ records are not locked, therefore another transaction may replace a
deleted record between two calls to retrieve it. The record would not
appear in the first call but would be seen by the second call. For
readers not enclosed in transactions, all access method calls provide
-degree 2 isolation, that is, reads are not repeatable. Finally, Berkeley DB
+degree 2 isolation, that is, reads are not repeatable. A transaction
+may be declared to run with degree 2 isolation by specifying the
+DB_DEGREE_2 flag. Finally, Berkeley DB
provides degree 1 isolation when the DB_DIRTY_READ flag is
specified; that is, reads may see data modified in transactions which
have not yet committed.
@@ -50,6 +52,6 @@ the scan inserts a new pair into the database, it is possible that
duplicate key/data pairs will be returned.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_misc/struct.html b/db/docs/ref/am_misc/struct.html
index 74881ede9..ff5423abe 100644
--- a/db/docs/ref/am_misc/struct.html
+++ b/db/docs/ref/am_misc/struct.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Storing C/C++ structures/objects
-
+
@@ -83,6 +83,6 @@ memcpy(&info.buf[0], string, strlen(string) + 1);
without any additional work.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/am_misc/tune.html b/db/docs/ref/am_misc/tune.html
index b8b828787..fa2c31607 100644
--- a/db/docs/ref/am_misc/tune.html
+++ b/db/docs/ref/am_misc/tune.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Access method tuning
-
+
@@ -18,8 +18,8 @@
Access method tuning
There are a few different issues to consider when tuning the performance
of Berkeley DB access method applications.
-
-- access method
- An application's choice of a database access method can significantly
+
+- access method
- An application's choice of a database access method can significantly
affect performance. Applications using fixed-length records and integer
keys are likely to get better performance from the Queue access method.
Applications using variable-length records are likely to get better
@@ -28,7 +28,7 @@ most applications than either the Hash or Recno access methods. Because
the access method APIs are largely identical between the Berkeley DB access
methods, it is easy for applications to benchmark the different access
methods against each other. See Selecting an access method for more information.
-
- cache size
- The Berkeley DB database cache defaults to a fairly small size, and most
+
- cache size
- The Berkeley DB database cache defaults to a fairly small size, and most
applications concerned with performance will want to set it explicitly.
Using a too-small cache will result in horrible performance. The first
step in tuning the cache size is to use the db_stat utility (or the
@@ -49,7 +49,7 @@ cache to the maximum size possible without triggering paging activity.
Finally, always remember to make your measurements under conditions as
close as possible to the conditions your deployed application will run
under, and to test your final choices under worst-case conditions.
-
- shared memory
- By default, Berkeley DB creates its database environment shared regions in
+
- shared memory
- By default, Berkeley DB creates its database environment shared regions in
filesystem backed memory. Some systems do not distinguish between
regular filesystem pages and memory-mapped pages backed by the
filesystem, when selecting dirty pages to be flushed back to disk. For
@@ -61,7 +61,7 @@ regions in system shared memory (DB_PRIVATE), or, in cases where this behavior
is configurable, to turn off the operating system's flushing of
memory-mapped pages.
-
- large key/data items
- Storing large key/data items in a database can alter the performance
+
- large key/data items
- Storing large key/data items in a database can alter the performance
characteristics of Btree, Hash and Recno databases. The first parameter
to consider is the database page size. When a key/data item is too
large to be placed on a database page, it is stored on "overflow" pages
@@ -117,6 +117,6 @@ of control to to some small multiple of the number of CPUs is usually
the right choice to make.
-
Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/apprec/auto.html b/db/docs/ref/apprec/auto.html
index 743ce6bd2..a321f2aea 100644
--- a/db/docs/ref/apprec/auto.html
+++ b/db/docs/ref/apprec/auto.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Automatically generated functions
-
+
@@ -90,20 +90,20 @@ ex_apprec_template and ex_apprec_rec.c for an example.)
(but not the automatically generated source_file, as that will get
overwritten each time gen_rec.awk is run) and fully developed there.
The recovery function takes the following parameters:
-
-- dbenv
- The environment in which recovery is running.
-
- rec
- The record being recovered.
-
- lsn
- The log sequence number of the record being recovered. The
+
+- dbenv
- The environment in which recovery is running.
+
- rec
- The record being recovered.
+
- lsn
- The log sequence number of the record being recovered. The
prev_lsn field, automatically included in every auto-generated log
record, should be returned through this argument. The prev_lsn field
is used to chain log records together to allow transaction aborts;
because the recovery function is the only place that a log record gets
parsed, the responsibility for returning this value lies with the
recovery function writer.
-
- op
- A parameter of type db_recops, which indicates what operation is being
+
- op
- A parameter of type db_recops, which indicates what operation is being
run (DB_TXN_ABORT, DB_TXN_APPLY, DB_TXN_BACKWARD_ROLL,
DB_TXN_FORWARD_ROLL or DB_TXN_PRINT).
-
- info
- A structure passed by the dispatch function. It is used to contain a
+
- info
- A structure passed by the dispatch function. It is used to contain a
list of committed transactions and information about files that may have
been deleted. Application-specific log records can usually simply
ignore this field.
@@ -114,15 +114,15 @@ record type.
The log function marshalls the parameters into a buffer, and calls
DB_ENV->log_put on that buffer returning 0 on success and non-zero on
failure. The log function takes the following parameters:
-
-- dbenv
- The environment in which recovery is running.
-
- txnid
- The transaction identifier for the transaction handle returned by
+
+- dbenv
- The environment in which recovery is running.
+
- txnid
- The transaction identifier for the transaction handle returned by
DB_ENV->txn_begin.
-
- lsnp
- A pointer to storage for a log sequence number into which the log
+
- lsnp
- A pointer to storage for a log sequence number into which the log
sequence number of the new log record will be returned.
-
- syncflag
- A flag indicating whether the record must be written synchronously.
+
- syncflag
- A flag indicating whether the record must be written synchronously.
Valid values are 0 and DB_FLUSH.
-
- args
- The remaining parameters to the log message are the fields described
+
- args
- The remaining parameters to the log message are the fields described
in the XXX.src file, in order.
The read function takes a buffer and unmarshalls its contents into a
@@ -130,10 +130,10 @@ structure of the appropriate type. It returns 0 on success and non-zero
on error. After the fields of the structure have been used, the pointer
returned from the read function should be freed. The read function
takes the following parameters:
-
-- dbenv
- The environment in which recovery is running.
-
- recbuf
- A buffer.
-
- argp
- A pointer to a structure of the appropriate type.
+
+- dbenv
- The environment in which recovery is running.
+
- recbuf
- A buffer.
+
- argp
- A pointer to a structure of the appropriate type.
The print function displays the contents of the record. The print
function takes the same parameters as the recovery function described
@@ -141,12 +141,12 @@ previously. Although some of the parameters are unused by the print
function, taking the same parameters allows a single dispatch loop to
dispatch to a variety of functions. The print function takes the
following parameters:
-
-- dbenv
- The environment in which recovery is running.
-
- rec
- The record being recovered.
-
- lsn
- The log sequence number of the record being recovered.
-
- op
- Unused.
-
- info
- Unused.
+
+- dbenv
- The environment in which recovery is running.
+
- rec
- The record being recovered.
+
- lsn
- The log sequence number of the record being recovered.
+
- op
- Unused.
+
- info
- Unused.
Finally, the source file will contain a function (named XXX_init_print,
where XXX is replaced by the prefix) which should be added to the
@@ -154,6 +154,6 @@ initialization part of the standalone d
so that utility can be used to display application-specific log records.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/apprec/config.html b/db/docs/ref/apprec/config.html
index 76579c60c..7497419e2 100644
--- a/db/docs/ref/apprec/config.html
+++ b/db/docs/ref/apprec/config.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Application configuration
-
+
@@ -123,6 +123,6 @@ to stable storage before calling the D
to allow the periodic removal of database environment log files.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/apprec/def.html b/db/docs/ref/apprec/def.html
index c85a4eddc..57960cc0d 100644
--- a/db/docs/ref/apprec/def.html
+++ b/db/docs/ref/apprec/def.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Defining application-specific log records
-
+
@@ -91,6 +91,6 @@ file btree/btree.src contains the definitions for the log records
supported by the Berkeley DB Btree access method.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/apprec/intro.html b/db/docs/ref/apprec/intro.html
index 7318bb7b7..7c3a5dd5d 100644
--- a/db/docs/ref/apprec/intro.html
+++ b/db/docs/ref/apprec/intro.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Introduction
-
+
@@ -47,13 +47,16 @@ and what part is undo information.
system call. After all requests are issued, the application may call
DB_TXN->commit. When DB_TXN->commit returns, the caller is
guaranteed that all necessary log writes have been written to disk.
-At any time before issuing a DB_TXN->commit,
-the application may call DB_TXN->abort, which will
-result in restoration of the database to a consistent pretransaction
-state. (The application may specify its own recovery function for this
-purpose using the DB_ENV->set_app_dispatch method. The recovery
-function must be able to either reapply or undo the update depending on
-the context, for each different type of log record.)
+At any time before issuing a DB_TXN->commit, the application may
+call DB_TXN->abort, which will result in restoration of the database
+to a consistent pretransaction state. (The application may specify its
+own recovery function for this purpose using the
+DB_ENV->set_app_dispatch method. The recovery function must be able to
+either reapply or undo the update depending on the context, for each
+different type of log record. The recovery functions must not use Berkeley DB
+methods to access data in the environment as there is no way to
+coordinate these accesses with either the aborting transaction or the
+updates done by recovery or replication.)
If the application crashes, the recovery process uses the log to restore
the database to a consistent state.
Berkeley DB includes tools to assist in the development of application-specific
@@ -72,6 +75,6 @@ usable on any system, not just POSIX systems.
in the Berkeley DB distribution, in the directory examples_c/ex_apprec.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/arch/apis.html b/db/docs/ref/arch/apis.html
index 7813c495a..fa776f838 100644
--- a/db/docs/ref/arch/apis.html
+++ b/db/docs/ref/arch/apis.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Programmatic APIs
-
+
@@ -72,6 +72,6 @@ the effectiveness of the internal hashing function on the particular
data set. This is not a problem with Berkeley DB.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/arch/bigpic.html b/db/docs/ref/arch/bigpic.html
index 54673406f..9d527a2f5 100644
--- a/db/docs/ref/arch/bigpic.html
+++ b/db/docs/ref/arch/bigpic.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: The big picture
-
+
@@ -77,29 +77,29 @@ it is wrapped in transaction calls. The transaction is started with
operation fails due to a deadlock, the transaction is aborted using
DB_TXN->abort, after which the operation may be retried.
There are actually five major subsystems in Berkeley DB, as follows:
-
-- Access Methods
- The access methods subsystem provides general-purpose support for
+
+- Access Methods
- The access methods subsystem provides general-purpose support for
creating and accessing database files formatted as Btrees, Hashed files,
and Fixed- and Variable-length records. These modules are useful in
the absence of transactions for applications that need fast formatted
file support. See DB->open and DB->cursor for more
information. These functions were already discussed in detail in the
previous chapters.
-
- Memory Pool
- The Memory Pool subsystem is the general-purpose shared memory buffer pool
+
- Memory Pool
- The Memory Pool subsystem is the general-purpose shared memory buffer pool
used by Berkeley DB. This is the shared memory cache that allows multiple
processes and threads within processes to share access to databases. This
module is useful outside of the Berkeley DB package for processes that require
portable, page-oriented, cached, shared file access.
-
- Transaction
- The Transaction subsystem allows a group of database changes to be
+
- Transaction
- The Transaction subsystem allows a group of database changes to be
treated as an atomic unit so that either all of the changes are done,
or none of the changes are done. The transaction subsystem implements
the Berkeley DB transaction model. This module is useful outside of the Berkeley DB
package for processes that want to transaction-protect their own data
modifications.
-
- Locking
- The Locking subsystem is the general-purpose lock manager used by Berkeley DB.
+
- Locking
- The Locking subsystem is the general-purpose lock manager used by Berkeley DB.
This module is useful outside of the Berkeley DB package for processes that
require a portable, fast, configurable lock manager.
-
- Logging
- The Logging subsystem is the write-ahead logging used to support the
+
- Logging
- The Logging subsystem is the write-ahead logging used to support the
Berkeley DB transaction model. It is largely specific to the Berkeley DB package,
and unlikely to be useful elsewhere except as a supporting module for
the Berkeley DB transaction subsystem.
@@ -120,6 +120,6 @@ subsystem, or the access methods subsystem wrapped in calls to the Berkeley DB
transaction interfaces.
-
Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/arch/progmodel.html b/db/docs/ref/arch/progmodel.html
index aad85ae76..f62904779 100644
--- a/db/docs/ref/arch/progmodel.html
+++ b/db/docs/ref/arch/progmodel.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Programming model
-
+
@@ -39,6 +39,6 @@ call. Of course, this model also greatly simplifies the creation of
network client-server applications.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/arch/script.html b/db/docs/ref/arch/script.html
index 4a5e3823f..797bd82ce 100644
--- a/db/docs/ref/arch/script.html
+++ b/db/docs/ref/arch/script.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Scripting languages
-
+
@@ -16,17 +16,21 @@
Scripting languages
Perl
-Two Perl APIs are distributed with the Berkeley DB release. The Perl
+ Two Perl wrappers are distributed with the Berkeley DB release. The Perl
interface to Berkeley DB version 1.85 is called DB_File. The Perl interface
to Berkeley DB version 2 and later is called BerkeleyDB. See
-Using Berkeley DB with Perl for more
+Using Berkeley DB with Perl for more
+information.
+PHP
+A PHP wrapper is distributed with the Berkeley DB release. See
+Using Berkeley DB with Perl for more
information.
Tcl
-A Tcl API is distributed with the Berkeley DB release. See
+ A Tcl wrapper is distributed with the Berkeley DB release. See
Using Berkeley DB with Tcl for more
information.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/arch/utilities.html b/db/docs/ref/arch/utilities.html
index 7d32fadc5..885268a66 100644
--- a/db/docs/ref/arch/utilities.html
+++ b/db/docs/ref/arch/utilities.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Supporting utilities
-
+
@@ -18,37 +18,37 @@
Supporting utilities
The following are the standalone utilities that provide supporting
functionality for the Berkeley DB environment:
-
-- berkeley_db_svc
- The berkeley_db_svc utility is the Berkeley DB RPC server that
+
+- berkeley_db_svc
- The berkeley_db_svc utility is the Berkeley DB RPC server that
provides standard server functionality for client applications.
-
- db_archive
- The db_archive utility supports database backup and archival,
+
- db_archive
- The db_archive utility supports database backup and archival,
and log file administration. It facilitates log reclamation and the
creation of database snapshots. Generally, some form of log archival
must be done if a database environment has been configured for logging
or transactions.
-
- db_checkpoint
- The db_checkpoint utility runs as a daemon process, monitoring
+
- db_checkpoint
- The db_checkpoint utility runs as a daemon process, monitoring
the database log and periodically issuing checkpoints. It facilitates
log reclamation and the creation of database snapshots. Generally, some
form of database checkpointing must be done if a database environment has
been configured for transactions.
-
- db_deadlock
- The db_deadlock utility runs as a daemon process, periodically
+
- db_deadlock
- The db_deadlock utility runs as a daemon process, periodically
traversing the database lock structures and aborting transactions when it
detects a deadlock. Generally, some form of deadlock detection must be
done if a database environment has been configured for locking.
-
- db_dump
- The db_dump utility writes a copy of the database to a flat-text
+
- db_dump
- The db_dump utility writes a copy of the database to a flat-text
file in a portable format.
-
- db_load
- The db_load utility reads the flat-text file produced by
+
- db_load
- The db_load utility reads the flat-text file produced by
db_dump and loads it into a database file.
-
- db_printlog
- The db_printlog utility displays the contents of Berkeley DB log files
+
- db_printlog
- The db_printlog utility displays the contents of Berkeley DB log files
in a human-readable and parsable format.
-
- db_recover
- The db_recover utility runs after an unexpected Berkeley DB or system
+
- db_recover
- The db_recover utility runs after an unexpected Berkeley DB or system
failure to restore the database to a consistent state. Generally, some
form of database recovery must be done if databases are being modified.
-
- db_stat
- The db_stat utility displays statistics for databases and database
+
- db_stat
- The db_stat utility displays statistics for databases and database
environments.
-
- db_upgrade
- The db_upgrade utility provides a command-line interface for
+
- db_upgrade
- The db_upgrade utility provides a command-line interface for
upgrading underlying database formats.
-
- db_verify
- The db_verify utility provides a command-line interface for
+
- db_verify
- The db_verify utility provides a command-line interface for
verifying the database format.
All of the functionality implemented for these utilities is also available
@@ -59,6 +59,6 @@ the necessity for multiple processes to negotiate database and database
environment creation and shut down.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/aix.html b/db/docs/ref/build_unix/aix.html
index d280c896c..f6ea88e93 100644
--- a/db/docs/ref/build_unix/aix.html
+++ b/db/docs/ref/build_unix/aix.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: AIX
-
+
@@ -78,6 +78,6 @@ include the problematical system include files.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/conf.html b/db/docs/ref/build_unix/conf.html
index 2b8ee79b4..886a19a54 100644
--- a/db/docs/ref/build_unix/conf.html
+++ b/db/docs/ref/build_unix/conf.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Configuring Berkeley DB
-
+
@@ -22,9 +22,9 @@ standard GNU autoconf arguments are available and supported. To see a
complete list of possible arguments, specify the --help flag to the
configure program.
The Berkeley DB specific arguments are as follows:
-
+
-- --disable-largefile
- Some systems, notably versions of HP/UX and Solaris, require special
+
- --disable-largefile
- Some systems, notably versions of HP/UX and Solaris, require special
compile-time options in order to create files larger than 2^32 bytes.
These options are automatically enabled when Berkeley DB is compiled. For
this reason, binaries built on current versions of these systems may
@@ -33,7 +33,7 @@ calls necessary for large files are not available. To disable building
with these compile-time options, enter --disable-largefile as an argument
to configure.
-
- --disable-shared, --disable-static
- On systems supporting shared libraries, Berkeley DB builds both static and
+
- --disable-shared, --disable-static
- On systems supporting shared libraries, Berkeley DB builds both static and
shared libraries by default. (Shared libraries are built using
the GNU
Project's Libtool distribution, which supports shared library builds
@@ -41,33 +41,33 @@ on many (although not all) systems.) To not build shared libraries,
configure using the --disable-shared argument. To not build static
libraries, configure using the --disable-static argument.
-
- --enable-compat185
- To compile or load Berkeley DB 1.85 applications against this release of the
+
- --enable-compat185
- To compile or load Berkeley DB 1.85 applications against this release of the
Berkeley DB library, enter --enable-compat185 as an argument to configure.
This will include Berkeley DB 1.85 API compatibility code in the library.
-
- --enable-cxx
- To build the Berkeley DB C++ API, enter --enable-cxx as an argument to
+
- --enable-cxx
- To build the Berkeley DB C++ API, enter --enable-cxx as an argument to
configure.
-
- --enable-debug
- To build Berkeley DB with -g as a compiler flag and with
+
- --enable-debug
- To build Berkeley DB with -g as a compiler flag and with
DEBUG #defined during compilation, enter --enable-debug as an
argument to configure. This will create a Berkeley DB library and utilities
with debugging symbols, as well as load various routines that can be
called from a debugger to display pages, cursor queues, and so forth.
If installed, the utilities will not be stripped. This argument should
not be specified when configuring to build production binaries.
-
- --enable-debug_rop
- To build Berkeley DB to output log records for read operations, enter
+
- --enable-debug_rop
- To build Berkeley DB to output log records for read operations, enter
--enable-debug_rop as an argument to configure. This argument should not
be specified when configuring to build production binaries.
-
- --enable-debug_wop
- To build Berkeley DB to output log records for write operations, enter
+
- --enable-debug_wop
- To build Berkeley DB to output log records for write operations, enter
--enable-debug_wop as an argument to configure. This argument should not
be specified when configuring to build production binaries.
-
- --enable-diagnostic
- To build Berkeley DB with run-time debugging checks, enter --enable-diagnostic
+
- --enable-diagnostic
- To build Berkeley DB with run-time debugging checks, enter --enable-diagnostic
as an argument to configure. This will cause a number of special checks
to be performed when Berkeley DB is running. Applications built using this
argument should not share database environments with applications built
without this argument. This argument should not be specified when
configuring to build production binaries.
-
- --enable-dump185
- To convert Berkeley DB 1.85 (or earlier) databases to this release of Berkeley DB,
+
- --enable-dump185
- To convert Berkeley DB 1.85 (or earlier) databases to this release of Berkeley DB,
enter --enable-dump185 as an argument to configure. This will build the
db_dump185 utility, which can dump Berkeley DB 1.85 and 1.86 databases
in a format readable by the Berkeley DB db_load utility.
@@ -78,7 +78,7 @@ are using a non-standard library for the Berkeley DB 1.85 library routines,
you will have to change the Makefile that the configuration step creates
to load the db_dump185 utility with that library.
-
- --enable-java
- To build the Berkeley DB Java API, enter --enable-java as an argument to
+
- --enable-java
- To build the Berkeley DB Java API, enter --enable-java as an argument to
configure. To build Java, you must also build with shared libraries.
Before configuring, you must set your PATH environment variable to
include javac. Note that it is not sufficient to include a symbolic
@@ -87,7 +87,7 @@ location of javac to determine the location of the Java include files
(for example, jni.h). On some systems, additional include directories
may be needed to process jni.h; see Changing compile or
load options for more information.
-
- --enable-posixmutexes
- To force Berkeley DB to use the POSIX pthread mutex interfaces for underlying
+
- --enable-posixmutexes
- To force Berkeley DB to use the POSIX pthread mutex interfaces for underlying
mutex support, enter --enable-posixmutexes as an argument to configure.
This is rarely necessary: POSIX mutexes will be selected automatically
on systems where they are the preferred implementation.
@@ -110,21 +110,21 @@ database environments, that is, environments where the
Specifying the --enable-posixmutexes configuration argument may require
that Berkeley DB be linked with the -lpthread library.
- - --enable-rpc
- To build the Berkeley DB RPC client code and server utility, enter --enable-rpc
+
- --enable-rpc
- To build the Berkeley DB RPC client code and server utility, enter --enable-rpc
as an argument to configure. The --enable-rpc argument requires that RPC
libraries already be installed on your system.
-
- --enable-smallbuild
- To build a small memory footprint version of the Berkeley DB library, enter
+
- --enable-smallbuild
- To build a small memory footprint version of the Berkeley DB library, enter
--enable-smallbuild as an argument to configure. The
--enable-smallbuild argument is equivalent to individually specifying
--disable-cryptography, --disable-hash, --disable-queue,
---disable-replication, and --disable-verify, turning off cryptography
-support, the Hash and Queue access methods, database environment
-replication support and database verification support. See
-Building a small memory footprint
-library for more information.
+--disable-replication, --disable-statistics and --disable-verify,
+turning off cryptography support, the Hash and Queue access methods,
+database environment replication support and database verification
+support. See Building a
+small memory footprint library for more information.
-
- --enable-tcl
- To build the Berkeley DB Tcl API, enter --enable-tcl as an argument to
+
- --enable-tcl
- To build the Berkeley DB Tcl API, enter --enable-tcl as an argument to
configure. This configuration argument expects to find Tcl's tclConfig.sh
file in the /usr/local/lib directory. See the --with-tcl
argument for instructions on specifying a non-standard location for the
@@ -133,11 +133,11 @@ with Tcl for information on sites from which you can download Tcl and
which Tcl versions are compatible with Berkeley DB. To build Tcl, you must
also build with shared libraries.
-
- --enable-test
- To build the Berkeley DB test suite, enter --enable-test as an argument to
+
- --enable-test
- To build the Berkeley DB test suite, enter --enable-test as an argument to
configure. To run the Berkeley DB test suite, you must also build the Tcl
API. This argument should not be specified when configuring to build
production binaries.
-
- --enable-uimutexes
- To force Berkeley DB to use the UNIX International (UI) mutex interfaces for
+
- --enable-uimutexes
- To force Berkeley DB to use the UNIX International (UI) mutex interfaces for
underlying mutex support, enter --enable-uimutexes as an argument to
configure. This is rarely necessary: UI mutexes will be selected
automatically on systems where they are the preferred implementation.
@@ -147,13 +147,13 @@ implementation is not the preferred one (for example, on Solaris where
the LWP mutexes are used by default).
Specifying the --enable-uimutexes configuration argument may require
that Berkeley DB be linked with the -lthread library.
- - --enable-umrw
- Rational Software's Purify product and other run-time tools complain
+
- --enable-umrw
- Rational Software's Purify product and other run-time tools complain
about uninitialized reads/writes of structure fields whose only purpose
is padding, as well as when heap memory that was never initialized is
written to disk. Specify the --enable-umrw argument during
configuration to mask these errors. This argument should not be
specified when configuring to build production binaries.
-
- --with-mutex=MUTEX
- To force Berkeley DB to use a specific mutex implementation, configure with
+
- --with-mutex=MUTEX
- To force Berkeley DB to use a specific mutex implementation, configure with
--with-mutex=MUTEX, where MUTEX is the mutex implementation you want.
For example, --with-mutex=x86/gcc-assembly will configure Berkeley DB to use
the x86 GNU gcc compiler based test-and-set assembly mutexes. This is
@@ -161,23 +161,23 @@ rarely necessary and should be done only when the default configuration
selects the wrong mutex implementation. A list of available mutex
implementations can be found in the distribution file
dist/aclocal/mutex.ac.
-
- --with-mutexalign=ALIGNMENT
- To force Berkeley DB to use a specific mutex byte alignment, configure with
+
- --with-mutexalign=ALIGNMENT
- To force Berkeley DB to use a specific mutex byte alignment, configure with
--with-mutexalignment=ALIGNMENT. For example, --with-mutexalignment=64
will configure Berkeley DB to align mutexes at 64-byte alignments, ensuring
no two mutexes use the same cache line on machines with 64-byte cache
alignment. This is only useful when performance tuning Berkeley DB for large
multiprocessor systems.
-
- --with-rpm=ARCHIVE
- To build Berkeley DB as an RPM software package, configure with --with-rpm=ARCHIVE,
+
- --with-rpm=ARCHIVE
- To build Berkeley DB as an RPM software package, configure with --with-rpm=ARCHIVE,
where ARCHIVE is the path of gzipped tar archive Berkeley DB distribution file.
This configuration argument will create an RPM specification file from
which the RPM software package can be built, using the "make" command.
-
- --with-tcl=DIR
- To build the Berkeley DB Tcl API, enter --with-tcl=DIR, replacing DIR with
+
- --with-tcl=DIR
- To build the Berkeley DB Tcl API, enter --with-tcl=DIR, replacing DIR with
the directory in which the Tcl tclConfig.sh file may be found. See
Loading Berkeley DB with Tcl for information
on sites from which you can download Tcl and which Tcl versions are
compatible with Berkeley DB. To build Tcl, you must also build with shared
libraries.
-
- --with-uniquename=NAME
- To build Berkeley DB with unique symbol names (in order to avoid conflicts
+
- --with-uniquename=NAME
- To build Berkeley DB with unique symbol names (in order to avoid conflicts
with other application modules or libraries), enter --with-uniquename=NAME,
replacing NAME with a string that to be appended to every Berkeley DB symbol.
If "=NAME" is not specified, a default value of "_MAJORMINOR" is used,
@@ -187,6 +187,6 @@ multiple versions of Berkeley DB for more information.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/flags.html b/db/docs/ref/build_unix/flags.html
index 422e4b393..9afec5f3f 100644
--- a/db/docs/ref/build_unix/flags.html
+++ b/db/docs/ref/build_unix/flags.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Changing compile or load options
-
+
@@ -57,6 +57,6 @@ prompt: ../dist/configure
See your command shell's manual page for further information.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/freebsd.html b/db/docs/ref/build_unix/freebsd.html
index f8a01d2d2..8e697e27d 100644
--- a/db/docs/ref/build_unix/freebsd.html
+++ b/db/docs/ref/build_unix/freebsd.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: FreeBSD
-
+
@@ -61,6 +61,6 @@ files should be placed on NFS-mounted filesystems on these systems.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/hpux.html b/db/docs/ref/build_unix/hpux.html
index a77b3e490..7f14b8718 100644
--- a/db/docs/ref/build_unix/hpux.html
+++ b/db/docs/ref/build_unix/hpux.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: HP-UX
-
+
@@ -91,6 +91,6 @@ include the problematical system include files.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/install.html b/db/docs/ref/build_unix/install.html
index 95fc34a91..d092b88ae 100644
--- a/db/docs/ref/build_unix/install.html
+++ b/db/docs/ref/build_unix/install.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Installing Berkeley DB
-
+
@@ -61,6 +61,6 @@ the install itself:
directories that do not already exist on the system.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/intro.html b/db/docs/ref/build_unix/intro.html
index 897943816..0b76cd7b2 100644
--- a/db/docs/ref/build_unix/intro.html
+++ b/db/docs/ref/build_unix/intro.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Building for UNIX/POSIX
-
+
@@ -44,6 +44,8 @@ start from scratch by entering the following command:
make realclean
../dist/configure
make
+To uninstall Berkeley DB, enter:
+make uninstall
To build multiple UNIX versions of Berkeley DB in the same source tree, create
a new directory at the same level as the build_unix directory, and then
configure and build in that directory as described previously.
@@ -57,6 +59,6 @@ compilation, and any output they produced.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/irix.html b/db/docs/ref/build_unix/irix.html
index 0e929b277..2ed8d2840 100644
--- a/db/docs/ref/build_unix/irix.html
+++ b/db/docs/ref/build_unix/irix.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: IRIX
-
+
@@ -26,6 +26,6 @@ must compile with the _SGI_MP_SOURCE flag:
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/linux.html b/db/docs/ref/build_unix/linux.html
index df0a4992f..b5cb079f2 100644
--- a/db/docs/ref/build_unix/linux.html
+++ b/db/docs/ref/build_unix/linux.html
@@ -1,18 +1,18 @@
-
-
+
+
Berkeley DB Reference Guide: Linux
-
+
- Berkeley DB Reference Guide:
- Building Berkeley DB for UNIX/POSIX systems
|
-
+ |
|
Linux
@@ -23,11 +23,6 @@ applications on Linux. If you are compiling a threaded application, you
must compile with the _REENTRANT flag:
cc -D_REENTRANT ...
The Berkeley DB library will automatically build with the correct options.
- - I see database corruption when accessing databases on
-NFS-mounted filesystems.
-
Some Linux filesystems are known to not support complete semantics for
-the POSIX fsync call on NFS-mounted filesystems. No Berkeley DB files should
-be placed on NFS-mounted filesystems on these systems.
- I see database corruption when accessing databases.
Some Linux filesystems do not support POSIX filesystem semantics.
Specifically, ext2 and early releases of ReiserFS, and ext3 in some
@@ -35,9 +30,13 @@ configurations, do not support "ordered data mode" and may insert random
data into database or log files when systems crash. Berkeley DB files should
not be placed on a filesystem that does not support, or is not
configured to support, POSIX semantics.
+ - What scheduler should I use?
+
In some Linux kernels you can select schedulers, and the default is the
+"anticipatory" scheduler. We recommend not using the "anticipatory"
+scheduler for transaction processing workloads.
-
|
+
- Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/notes.html b/db/docs/ref/build_unix/notes.html
index 7f9cdb167..ec2267c74 100644
--- a/db/docs/ref/build_unix/notes.html
+++ b/db/docs/ref/build_unix/notes.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Architecture independent FAQ
-
+
@@ -106,7 +106,8 @@ Purify tool).
For performance reasons, Berkeley DB does not write the unused portions of
database pages or fill in unused structure fields. To turn off these
errors when running software analysis tools, build with the
---enable-umrw configuration option.
+--enable-umrw
+configuration option.
- Berkeley DB programs or the test suite fail unexpectedly.
The Berkeley DB architecture does not support placing the shared memory
@@ -148,6 +149,6 @@ DB185LIB=-ldb185
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/osf1.html b/db/docs/ref/build_unix/osf1.html
index 1a7646f17..d5c00a927 100644
--- a/db/docs/ref/build_unix/osf1.html
+++ b/db/docs/ref/build_unix/osf1.html
@@ -1,18 +1,18 @@
-
-
+
+
Berkeley DB Reference Guide: OSF/1
-
+
- Berkeley DB Reference Guide:
- Building Berkeley DB for UNIX/POSIX systems
|
-
+ |
|
OSF/1
@@ -24,8 +24,8 @@ must compile with the _REENTRANT flag:
cc -D_REENTRANT ...
The Berkeley DB library will automatically build with the correct options.
-
|
+
- Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/qnx.html b/db/docs/ref/build_unix/qnx.html
index 3cfbec511..132cb40c4 100644
--- a/db/docs/ref/build_unix/qnx.html
+++ b/db/docs/ref/build_unix/qnx.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: QNX
-
+
@@ -72,6 +72,6 @@ should be used with caution on QNX.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/sco.html b/db/docs/ref/build_unix/sco.html
index 9d237e73d..1df28f11e 100644
--- a/db/docs/ref/build_unix/sco.html
+++ b/db/docs/ref/build_unix/sco.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: SCO
-
+
@@ -25,6 +25,6 @@ libraries.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/shlib.html b/db/docs/ref/build_unix/shlib.html
index 7f02f5a8d..fa03b7932 100644
--- a/db/docs/ref/build_unix/shlib.html
+++ b/db/docs/ref/build_unix/shlib.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Dynamic shared libraries
-
+
@@ -99,6 +99,6 @@ program. On other systems, using libtool has the virtue of knowing about
any other details on systems that don't behave in this typical way.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/small.html b/db/docs/ref/build_unix/small.html
index ca2beab54..2c1fc4e26 100644
--- a/db/docs/ref/build_unix/small.html
+++ b/db/docs/ref/build_unix/small.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Building a small memory footprint library
-
+
@@ -19,28 +19,30 @@
small memory footprint library. These configuration options turn off
specific functionality in the Berkeley DB library, reducing the code size.
These configuration options include:
-
-- --disable-cryptography
- To build Berkeley DB without support for cryptography, enter
+
+- --disable-cryptography
- To build Berkeley DB without support for cryptography, enter
--disable-cryptography as an argument to configure.
-
- --disable-hash
- To build Berkeley DB without support for the Hash access method, enter
+
- --disable-hash
- To build Berkeley DB without support for the Hash access method, enter
--disable-hash as an argument to configure.
-
- --disable-queue
- To build Berkeley DB without support for the Queue access method, enter
+
- --disable-queue
- To build Berkeley DB without support for the Queue access method, enter
--disable-queue as an argument to configure.
-
- --disable-replication
- To build Berkeley DB without support for the database environment replication,
+
- --disable-replication
- To build Berkeley DB without support for the database environment replication,
enter --disable-replication as an argument to configure.
-
- --disable-verify
- To build Berkeley DB without support for database verification, enter
+
- --disable-statistics
- To build Berkeley DB without support for the statistics interfaces, enter
+--disable-statistics as an argument to configure.
+
- --disable-verify
- To build Berkeley DB without support for database verification, enter
--disable-verify as an argument to configure.
-
- --enable-smallbuild
- Equivalent to individually specifying --disable-cryptography,
---disable-hash, --disable-queue, --disable-replication, and
---disable-verify
+
- --enable-smallbuild
- Equivalent to individually specifying --disable-cryptography,
+--disable-hash, --disable-queue, --disable-replication,
+--disable-statistics and --disable-verify
The following configuration options will increase the size of the Berkeley DB
library dramatically and are only useful when debugging applications:
-
-- --enable-debug
- Build Berkeley DB with symbols for debugging.
-
- --enable-debug_rop
- Build Berkeley DB with read-operation logging.
-
- --enable-debug_wop
- Build Berkeley DB with write-operation logging.
-
- --enable-diagnostic
- Build Berkeley DB with run-time debugging checks.
+
+- --enable-debug
- Build Berkeley DB with symbols for debugging.
+
- --enable-debug_rop
- Build Berkeley DB with read-operation logging.
+
- --enable-debug_wop
- Build Berkeley DB with write-operation logging.
+
- --enable-diagnostic
- Build Berkeley DB with run-time debugging checks.
In addition, static libraries are usually smaller than shared libraries.
By default Berkeley DB will build both shared and static libraries. To build
@@ -54,6 +56,6 @@ building small memory footprint libraries on other systems, please contact
Sleepycat Software support.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/solaris.html b/db/docs/ref/build_unix/solaris.html
index 8ab696dc7..46c0b8418 100644
--- a/db/docs/ref/build_unix/solaris.html
+++ b/db/docs/ref/build_unix/solaris.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Solaris
-
+
@@ -111,6 +111,6 @@ include the problematical system include files.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/sunos.html b/db/docs/ref/build_unix/sunos.html
index 469d0b5fe..d112baeea 100644
--- a/db/docs/ref/build_unix/sunos.html
+++ b/db/docs/ref/build_unix/sunos.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: SunOS
-
+
@@ -26,6 +26,6 @@ versions of SunOS.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/test.html b/db/docs/ref/build_unix/test.html
index 13151129d..daebf8c6c 100644
--- a/db/docs/ref/build_unix/test.html
+++ b/db/docs/ref/build_unix/test.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Running the test suite under UNIX
-
+
@@ -51,6 +51,6 @@ command:
information.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_unix/ultrix.html b/db/docs/ref/build_unix/ultrix.html
index 18cddf6cd..84b2dc795 100644
--- a/db/docs/ref/build_unix/ultrix.html
+++ b/db/docs/ref/build_unix/ultrix.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Ultrix
-
+
@@ -23,6 +23,6 @@ they exist, because they are known to not work correctly.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_vxworks/faq.html b/db/docs/ref/build_vxworks/faq.html
index f9cea42a2..a7bfe0fca 100644
--- a/db/docs/ref/build_vxworks/faq.html
+++ b/db/docs/ref/build_vxworks/faq.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: VxWorks FAQ
-
+
@@ -108,9 +108,14 @@ particular problem.
look at SPR 72063 in the Wind River Systems' Support pages for
a more detailed description of this problem.
- Are there any filesystems I cannot use?
+
Currently both the Target Server File System (TSFS) and NFS are not able
+to be used.
The Target Server File System (TSFS) uses the netDrv driver. This driver
-does not support any ioctl that allows flushing to the disk, and therefore
-cannot be used with Berkeley DB.
+does not support any ioctl that allows flushing to the disk, nor does
+it allow renaming of files via FIORENAME.
+The NFS file system uses nfsDrv and that driver
+does not support FIORENAME and cannot be used
+with Berkeley DB.
- What VxWorks primitives are used for mutual exclusion in Berkeley DB?
Mutexes inside of Berkeley DB use the basic binary semaphores in VxWorks. The
mutexes are created using the FIFO queue type.
@@ -130,6 +135,6 @@ may leak their underlying system resources. Therefore, the
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_vxworks/intro.html b/db/docs/ref/build_vxworks/intro.html
index 76d479d57..bec44b47a 100644
--- a/db/docs/ref/build_vxworks/intro.html
+++ b/db/docs/ref/build_vxworks/intro.html
@@ -1,26 +1,23 @@
-
-
+
+
Berkeley DB Reference Guide: Building for VxWorks
-
+
- Berkeley DB Reference Guide:
- Building Berkeley DB for VxWorks systems
|
-
+ |
|
Building for VxWorks
The build_vxworks directory in the Berkeley DB distribution contains a workspace
-and project files for Tornado 2.0/VxWorks 5.4, Tornado 2.2/VxWorks 5.5
-and component files for Tornado 3.1/VxWorks AE. See
-Building for VxWorks AE for
-information about VxWorks AE.
+and project files for Tornado 2.0/VxWorks 5.4 and Tornado 2.2/VxWorks 5.5.
File | Description |
BerkeleyDB20.wsp | Berkeley DB Workspace file for Tornado 2.0 |
@@ -36,13 +33,14 @@ information about VxWorks AE.
Open the workspace BerkeleyDB20.wsp or BerkeleyDB22.wsp.
The list of projects in this workspace will be shown. These projects
were created for the x86 BSP for VxWorks.
-The remainder of this document assumes that you already have a
-VxWorks target and a target server, both up and running. It also
-assumes that your VxWorks image is configured properly for your
-needs. It also assumes that you
-have an acceptable file system already available. See
-VxWorks FAQ for more
-information about file system requirements.
+The remainder of this document assumes that you already have a VxWorks
+target and a target server, both up and running. It also assumes that
+your VxWorks image is configured properly for your needs. It also
+assumes that you have an acceptable file system already available.
+See VxWorks FAQ for more
+information about file system requirements.
+See VxWorks Notes for more
+information about building a small footprint version of Berkeley DB.
First, you need to set the include directories. To do this, go to the
Builds tab for the workspace. Open up Berkeley DB
Builds. You will see several different builds, containing different
@@ -98,8 +96,8 @@ depending on which version of Tornado you are running.
You need to repeat this procedure for all builds you are interested in
building, as well as for all of the utility project builds you want to
run.
-
|
+
- Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_vxworks/introae.html b/db/docs/ref/build_vxworks/introae.html
index f1ddb5ad9..2d80a4152 100644
--- a/db/docs/ref/build_vxworks/introae.html
+++ b/db/docs/ref/build_vxworks/introae.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Building for VxWorks AE
-
+
@@ -129,6 +129,6 @@ building, as well as for all of the utility project builds you want to
run.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_vxworks/notes.html b/db/docs/ref/build_vxworks/notes.html
index e30859af1..e2c06a973 100644
--- a/db/docs/ref/build_vxworks/notes.html
+++ b/db/docs/ref/build_vxworks/notes.html
@@ -1,18 +1,18 @@
-
-
+
+
Berkeley DB Reference Guide: VxWorks notes
-
+
- Berkeley DB Reference Guide:
- Building Berkeley DB for VxWorks systems
|
-
+ |
|
VxWorks notes
@@ -28,8 +28,7 @@ system supporting FIOSYNC.
building Berkeley DB. If you want different or additional BSP
build specifications you should add them by following the
directions indicated in Building
-with Tornado 2.0 or Tornado 2.2 or
-Building with Tornado 3.1.
+with Tornado 2.0 or Tornado 2.2.
The demo program can be downloaded and run by calling the entry function
dbdemo with the pathname of a database to use. The demo
program will ask for some input keys. It creates a database and adds
@@ -56,14 +55,15 @@ flag is implied for any application that does not specify the
ID to ensure that different applications do not overwrite each other's
database environments. See the DB_ENV->set_shm_key method for more
information. Also, the DB_LOCKDOWN flag has no effect.
-Notes for VxWorks AE 1.1
-All tasks wanting to access a particular environment must run in the
-same application domain. The memory regions used by the environment are
-only accessible to the application domain. If more than one application
-domain attempts to access an environment simultaneously, the results are
-undefined but will likely lead to corruption.
-
|
+ A default small footprint build is provided. This default provides
+equivalent to the --enable-smallbuild configuration option
+described in Building a
+small memory footprint library. In order to build the small
+footprint, you should move db_config.h aside and copy
+db_config_small.h to db_config.h. Then open up
+the appropriate small workspace file via Tornado and build as usual.
+
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_win/faq.html b/db/docs/ref/build_win/faq.html
index ba7410a98..0bebd855c 100644
--- a/db/docs/ref/build_win/faq.html
+++ b/db/docs/ref/build_win/faq.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Windows FAQ
-
+
@@ -29,14 +29,14 @@ click on db_load -> Properties and change "Configuration Type" from
fprintf (or some other standard C library function).
You should be using the "Debug Multithreaded DLL" compiler option in
your application when you link with the
-build_win32/Debug/libdb42d.lib library (this .lib file
-is actually a stub for libdb42d.DLL). To check this
+build_win32/Debug/libdb43d.lib library (this .lib file
+is actually a stub for libdb43d.DLL). To check this
setting in Visual C++, choose the Project/Settings menu
item and select Code Generation under the tab marked
C/C++; and see the box marked Use runtime
library. This should be set to Debug Multithreaded DLL.
If your application is linked against the static library,
-build_win32/Debug/libdb42sd.lib; then, you will want
+build_win32/Debug/libdb43sd.lib; then, you will want
to set Use runtime library to Debug Multithreaded.
Setting this option incorrectly can cause multiple versions of the
standard libraries to be linked into your application (one on behalf
@@ -75,6 +75,6 @@ source.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_win/intro.html b/db/docs/ref/build_win/intro.html
index bbc6f7387..390a7fd0c 100644
--- a/db/docs/ref/build_win/intro.html
+++ b/db/docs/ref/build_win/intro.html
@@ -1,18 +1,18 @@
-
+
Berkeley DB Reference Guide: Building for Win32
-
+
- Berkeley DB Reference Guide:
- Building Berkeley DB for Windows systems
|
-
+ |
|
Building for Win32
@@ -25,7 +25,9 @@ project files for Microsoft Visual C++:
|
These project files can be used to build Berkeley DB for any Win32 platform:
Windows/XP, Windows/2000, Windows/NT, Windows/98 and Windows/95.
-Building Berkeley DB with Visual C++ .NET
+The build_win64 directory contains project files for Microsoft
+Visual C++ to target Windows on 64-bit CPUs:
+Building Berkeley DB with Visual C++ .NET for Win32
- Choose File -> Open Solution. Look in the
build_win32 directory for compatible workspace files, select
@@ -44,7 +46,7 @@ your build will be placed in a subdirectory of build_win32
named after the configuration you chose (for examples,
build_win32/Release or build_win32/Debug).
-Building Berkeley DB with Visual C++ 6.0
+Building Berkeley DB with Visual C++ 6.0 for Win32
- Choose File -> Open Workspace. Look in the
build_win32 directory for Workspaces, select
@@ -65,20 +67,39 @@ examples, build_win32/Release or
When building your application, you should normally use compile
options "Debug Multithreaded DLL" and link against
-build_win32/Debug/libdb42d.lib. If you
+build_win32/Debug/libdb43d.lib. If you
want to link against a static (non-DLL) version of the library, use
the "Debug Multithreaded" compile options and link against
-build_win32/Debug_static/libdb42sd.lib.
+build_win32/Debug_static/libdb43sd.lib.
You can also build using a release version of the libraries and tools,
which will be placed in
-build_win32/Release/libdb42.lib. The
+build_win32/Release/libdb43.lib. The
static version will be in
-build_win32/Release_static/libdb42s.lib.
+build_win32/Release_static/libdb43s.lib.
You will also need to add the build_win32 directory to the
list of include directories of your application's project.
Each release of Berkeley DB is built and tested with this procedure using
Microsoft Visual C++ 6.0, Standard Version and Microsoft Visual C++
.NET, Standard Version.
+Building Berkeley DB for 64-bit Windows
+You can follow the same steps on either the Itanium itself or to
+cross-compile on an x86 box.
+You will need latest Platform SDK from Microsoft, available from
+Microsoft's web site. You only need the "Core SDK" from there.
+Once that is installed, you should have an entry in your Start Menu
+called Microsoft Platform SDK (date) -> Open Build
+Environment Window -> Windows Server 2003 64-bit Build Environment
+-> Set Win Svr 2003 Build Env (Debug). Selecting that will open
+a command window with the environment set up for Itanium development.
+Then, in the build_win64 directory in the Berkeley DB distribution,
+run:
+ msdev /useenv BerkeleyDB.dsw /make "build_all - Debug"
+You should now have Itanium binaries in the "Debug" directory.
+To build a release, open the "Retail" window instead of the "Debug"
+window, and run:
+ msdev /useenv BerkeleyDB.dsw /make "build_all - Release"
+There may be some warnings during build, but we don't believe any of
+them are real bugs.
Building Berkeley DB with Cygwin
To build Berkeley DB with Cygwin, follow the instructions in
Building for UNIX.
@@ -127,7 +148,7 @@ javac.
either the Debug or Release version of the db_java project. Then
press OK.
- To build, select Build -> Build
-libdb_java42.dll. This builds the Java support
+libdb_java43.dll. This builds the Java support
library for Berkeley DB and compiles all the java files, placing the
resulting db.jar and dbexamples.jar files in the
build_win32/Release or build_win32/Debug
@@ -178,7 +199,7 @@ tool bar.
- To build, right-click on db_tcl and select Build. This builds the Tcl
support library for Berkeley DB, placing the result into
build_win32/Debug/libdb_tcl4M4MINORd.dll or
-build_win32/Release/libdb_tcl42.dll.
+build_win32/Release/libdb_tcl43.dll.
If you use a version different from Tcl 8.4.x you will
need to change the name of the Tcl library used in the build (for
@@ -205,18 +226,19 @@ whatever the library is named in your distribution).
either the Debug or Release version of the db_tcl project. Then press
OK.
- To build, select Build -> Build
-libdb_tcl42.dll. This builds the Tcl support
+libdb_tcl43.dll. This builds the Tcl support
library for Berkeley DB, placing the result into
build_win32/Debug/libdb_tcl4M4MINORd.dll or
-build_win32/Release/libdb_tcl42.dll.
+build_win32/Release/libdb_tcl43.dll.
If you use a version different from Tcl 8.4.x you will
need to change the name of the Tcl library used in the build (for
example, tcl84g.lib) to the
-appropriate name. To do this, right click on db_tcl, go to
-Settings -> Link -> Object / library modules
-and change tcl84g.lib to match the
-Tcl version you are using.
+appropriate name. To do this, choose
+Project -> Settings -> db_tcl
+and change the Tcl library listed in the Object/Library modules
+tcl84g.lib to match the Tcl version
+you are using.
Distributing DLLs
When distributing applications linked against the DLL (not static)
version of the library, the DLL files you need will be found in the
@@ -231,8 +253,8 @@ installed in the same directory that will contain your installed Berkeley DB
DLLs. This directory may need to be added to your System PATH
environment variable. Check your compiler's license and documentation
for specifics on redistributing runtime DLLs.
-
|
+
- Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_win/notes.html b/db/docs/ref/build_win/notes.html
index 9feb6cec9..5d4a4b363 100644
--- a/db/docs/ref/build_win/notes.html
+++ b/db/docs/ref/build_win/notes.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Windows notes
-
+
@@ -29,6 +29,17 @@ with an obvious race.
Practically speaking, however, these efforts would be largely meaningless
on a FAT file system, which only has a "readable" and "writable" flag,
applying to all users.
+- On Windows, Berkeley DB supports internationalized filenames by treating all
+directory paths and filenames passed to Berkeley DB methods as UTF-8 strings.
+All paths are internally converted to wide character strings and passed
+to the wide character variants of Windows system calls.
+
This allows applications to create and open databases with names that
+cannot be represented with ASCII names while maintaining compatibility
+with applications that work purely with ASCII paths.
+Applications that operate on wide character strings can use the Windows
+function WideCharToMultiByte with the code page CP_UTF8 to convert paths
+to the form expected by Berkeley DB. Internally, Berkeley DB calls MultiByteToWideChar
+on paths before calling Windows functions.
- On Windows/9X, files opened by multiple processes do not share data
correctly. For this reason, the DB_SYSTEM_MEM flag is implied
for any application that does not specify the DB_PRIVATE flag,
@@ -57,6 +68,6 @@ directly specified through the DB_ENV->op
-
Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_win/small.html b/db/docs/ref/build_win/small.html
index fa2ffd47b..8c5e1352b 100644
--- a/db/docs/ref/build_win/small.html
+++ b/db/docs/ref/build_win/small.html
@@ -1,20 +1,20 @@
-
-
+
+
-Berkeley DB Reference Guide: Building a small memory footprint library on Windows
+Berkeley DB Reference Guide: Building a small memory footprint library
-
+
- Berkeley DB Reference Guide:
- Building Berkeley DB for Windows systems
|
-
+ |
|
- Building a small memory footprint library on Windows
+Building a small memory footprint library
For applications that don't require all of the functionality of the full
Berkeley DB library, an option is provided to build a static library with
certain functionality disabled. In particular, cryptography, hash and
@@ -38,8 +38,8 @@ in Release_small or Debug_small, respectively.
For assistance in further reducing the size of the Berkeley DB library, or in
building small memory footprint libraries on other systems, please contact
Sleepycat Software support.
-
|
+
- Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_win/test.html b/db/docs/ref/build_win/test.html
index de817f9c6..8120bf580 100644
--- a/db/docs/ref/build_win/test.html
+++ b/db/docs/ref/build_win/test.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Running the test suite under Windows
-
+
@@ -72,6 +72,6 @@ the Tcl shell for your system.
information.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/build_win/unicode.html b/db/docs/ref/build_win/unicode.html
new file mode 100644
index 000000000..ed6eca30b
--- /dev/null
+++ b/db/docs/ref/build_win/unicode.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+Berkeley DB Reference Guide: Unicode support
+
+
+
+
+
+
+- Berkeley DB Reference Guide:
- Building Berkeley DB for Windows systems
|
+
+ |
+
+ Unicode support
+Unicode support requires a separate configuration step on Windows.
+To enable Unicode support, perform the following steps:
+
+- Right click on the "db_dll" project and choose Settings... (Visual
+Studio .NET: Properties), then C/C++. The "Preprocessor definitions"
+should read:
+
DB_CREATE_DLL,...
+Change it to read:
+UNICODE,_UNICODE,DB_CREATE_DLL,...
+You will have to do this twice: once for the debug build and once for
+the release build. If you also require static libraries, repeat for the
+"db_static" project (there the first symbol is "CONFIG_TEST" for the
+Debug Static build and "WIN32" for the Release Static build).
+ - Select "Rebuild All" from the Build menu.
+
+To build binaries that can also run on Windows 9x or ME, follow the
+instructions at Microsoft's web site.
+
+Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
+
+
diff --git a/db/docs/ref/cam/app.html b/db/docs/ref/cam/app.html
new file mode 100644
index 000000000..3720a5e4a
--- /dev/null
+++ b/db/docs/ref/cam/app.html
@@ -0,0 +1,131 @@
+
+
+
+
+
+
+Berkeley DB Reference Guide: Architecting Data Store and Concurrent Data Store applications
+
+
+
+
+
+- Berkeley DB Reference Guide:
- Berkeley DB Concurrent Data Store Applications
|
+
+ |
+
+ Architecting Data Store and Concurrent Data Store applications
+When building Data Store and Concurrent Data Store applications, there
+are two special issues to consider whenever any thread of control exits
+for any reason with a Berkeley DB database or database environment open.
+First, unexpected application or system failure may result in lost data,
+corruption or inconsistencies in Berkeley DB databases. When a thread of
+control exits while holding Berkeley DB resources, all databases (modified
+since the database was last flushed to disk), should be either:
+
+- removed and re-created,
+
- removed and restored from the last known good backup,
+
- verified using the DB->verify method or db_verify utility. If
+the database does not verify cleanly, the contents may be salvaged using
+the -R and -r options of the db_dump
+utility.
+
+Applications where this is unacceptable should consider the Berkeley DB Transactional Data Store
+product, which offers standard transactional guarantees such as
+recoverability after failure.
+Second, unexpected application or system failure requires that any
+persistent database environment (that is, any database environment not
+created using the DB_PRIVATE flag), be removed to recover the
+Berkeley DB resources and release any locks or mutexes that may have been held
+to avoid starvation as the remaining threads of control block behind the
+failed thread's locks or mutexes.
+The Berkeley DB library cannot determine when to remove and re-create a
+database environment; the application must make that decision.
+Furthermore, database environment removal must be single-threaded; that
+is, one thread of control or process must remove and re-create the
+database environment before any other thread of control or process
+attempts to join the Berkeley DB environment.
+There are two approaches to handling this problem:
+
+- The hard way:
- Applications can track their own state carefully enough that they know
+when the database environment needs to be removed and re-created.
+Specifically, the rule to use is that any persistent database
+environment must be removed any time the threads of control previously
+using the Berkeley DB environment did not shut the environment down cleanly
+before exiting the environment for any reason (including application or
+system failure).
+
- The easy way:
- It is almost invariably simpler to remove and re-create the database
+environment each time a thread of control accessing a database
+environment fails for any reason. This requires the application detect
+application or system failure, of course, and remove and re-create the
+database environment on application, when appropriate.
+
+There are two common ways to build Data Store and Concurrent Data Store
+applications. The most common way is as a single, usually
+multithreaded, process. This architecture is simplest because it
+requires no monitoring of other threads of control. When the
+application starts, it opens and potentially creates the environment,
+and then opens its databases. From then on, the application can create
+new threads of control as it chooses. All threads of control share the
+open Berkeley DB DB_ENV and DB handles. In this model,
+databases are rarely opened or closed when more than a single thread of
+control is running; that is, they are opened when only a single thread
+is running, and closed after all threads but one have exited. The last
+thread of control to exit closes the databases and the environment.
+An alternative way to build Berkeley DB applications is as a set of
+cooperating processes, which may or may not be multithreaded. This
+architecture is more complicated.
+First, this architecture requires that the order in which threads of
+control are created and subsequently access the Berkeley DB environment be
+controlled because database environment removal must be single-threaded.
+The first thread of control to access the environment must remove any
+previously existing environment and re-create the environment, and no
+other thread should attempt to access the environment until the removal
+is complete. (Note this ordering requirement does not apply to
+environment creation without removal. If multiple threads attempt to
+create a Berkeley DB environment, only one will perform the creation and the
+others will join the already existing environment.)
+Second, this architecture requires that threads of control be monitored.
+If any thread of control that owns Berkeley DB resources exits without first
+cleanly discarding those resources, removing the database environment
+is usually necessary. Before removing the database environment, all
+threads using the Berkeley DB environment must relinquish all of their Berkeley DB
+resources (it does not matter if they do so gracefully or because they
+are forced to exit). Then, the database environment can be removed and
+and the threads of control continued or restarted.
+We have found that the safest way to structure groups of cooperating
+processes is to first create a single process (often a shell script)
+that removes and re-creates the Berkeley DB environment, verifies, rebuilds
+or removes the databases, and then creates the processes or threads that
+will actually perform work. The initial thread has no further
+responsibilities other than to monitor the threads of control it has
+created, to ensure that none of them unexpectedly exits. If one exits,
+the initial process then forces all of the threads of control using the
+Berkeley DB environment to exit, removes the database environment, verifies,
+rebuilds or removes the databases, and restarts the working threads of
+control.
+If it is not practical to have a single parent for the processes sharing
+a Berkeley DB environment, each process sharing the environment should log
+their connection to and exit from the environment in a way that allows
+a monitoring process to detect if a thread of control might have
+acquired Berkeley DB resources and never released them. In this model, an
+initial "watcher" process removes and re-creates the Berkeley DB environment,
+verifies, rebuilds or removes the databases, and then creates a sentinel
+file. Any other process wanting to use the Berkeley DB environment checks for
+the sentinel file; if the sentinel file exists, the other process
+registers its process ID with the watcher and joins the database
+environment. When the new process finishes with the environment, it
+unregisters its process ID with the watcher. The watcher periodically
+checks to ensure that no process has failed while using the environment.
+If a process does fail while using the environment, the watcher removes
+the sentinel file, kills all processes currently using the environment,
+removes and re-creates the database environment, verifies, rebuilds or
+removes the databases, and re-creates the sentinel file.
+Obviously, it is important that the monitoring process in either case
+be as simple and well-tested as possible because there is no recourse
+if it fails.
+
+Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
+
+
diff --git a/db/docs/ref/cam/intro.html b/db/docs/ref/cam/intro.html
index 1b5f26b9a..fab7ce578 100644
--- a/db/docs/ref/cam/intro.html
+++ b/db/docs/ref/cam/intro.html
@@ -1,18 +1,18 @@
-
-
+
+
Berkeley DB Reference Guide: Berkeley DB Concurrent Data Store applications
-
+
- Berkeley DB Reference Guide:
- Berkeley DB Concurrent Data Store Applications
|
-
+ |
|
Berkeley DB Concurrent Data Store applications
@@ -94,15 +94,15 @@ lock that is blocking it.
- Not testing Berkeley DB error return codes (if any cursor operation returns
an unexpected error, that cursor must still be closed).
- By default, Berkeley DB Concurrent Data Store does locking on a per-database basis. For this reason,
-accessing multiple databases in different orders in different threads
-or processes, or leaving cursors open on one database while accessing
+using cursors to access multiple databases in different orders in different
+threads or processes, or leaving cursors open on one database while accessing
another database, can cause an application to hang. If this behavior
is a requirement for the application, Berkeley DB should be configured to do
locking on an environment-wide basis. See the DB_CDB_ALLDB flag
of the DB_ENV->set_flags function for more information.
-
|
+
- Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/debug/common.html b/db/docs/ref/debug/common.html
index 4ce650e50..8e6634671 100644
--- a/db/docs/ref/debug/common.html
+++ b/db/docs/ref/debug/common.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Troubleshooting common Berkeley DB problems
-
+
@@ -133,9 +133,16 @@ specifying the DB_RMW flag on your
Or, if the application is doing a large number of updates in a small
database, turning off Btree splits may help (see DB_REVSPLITOFF
for more information.)
+
+- Opening the database environment displays the following error:
+
Log sequence error: page LSN # ######; previous LSN ## ######.
+A database update was made outside of a transaction. Check that your
+application passes a transaction handle to all opens and updates of
+transactionally protected databases. This error leaves the environment
+unrecoverable, and the databases must be dumped and reloaded.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/debug/compile.html b/db/docs/ref/debug/compile.html
index 99eea3924..64cb5fb03 100644
--- a/db/docs/ref/debug/compile.html
+++ b/db/docs/ref/debug/compile.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Compile-time configuration
-
+
@@ -17,8 +17,8 @@
Compile-time configuration
There are three compile-time configuration options that assist in
debugging Berkeley DB and Berkeley DB applications:
-
-- --enable-debug
- If you want to build Berkeley DB with -g as the C and C++ compiler
+
+- --enable-debug
- If you want to build Berkeley DB with -g as the C and C++ compiler
flag, enter --enable-debug as an argument to configure. This will create
Berkeley DB with debugging symbols, as well as load various Berkeley DB routines
that can be called directly from a debugger to display database page
@@ -26,12 +26,12 @@ content, cursor queues, and so forth. (Note that the -O
optimization flag will still be specified. To compile with only the
-g, explicitly set the CFLAGS environment variable
before configuring.)
-
- --enable-diagnostic
- If you want to build Berkeley DB with debugging run-time sanity checks and with
+
- --enable-diagnostic
- If you want to build Berkeley DB with debugging run-time sanity checks and with
DIAGNOSTIC #defined during compilation, enter --enable-diagnostic as an
argument to configure. This will cause a number of special checks to be
performed when Berkeley DB is running. This flag should not be defined when
configuring to build production binaries because it degrades performance.
-
- --enable-umrw
- When compiling Berkeley DB for use in run-time memory consistency checkers
+
- --enable-umrw
- When compiling Berkeley DB for use in run-time memory consistency checkers
(in particular, programs that look for reads and writes of uninitialized
memory), use --enable-umrw as an argument to configure. This
guarantees, among other things, that Berkeley DB will completely initialize
@@ -40,6 +40,6 @@ amount.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/debug/intro.html b/db/docs/ref/debug/intro.html
index dfb988492..b22c3f968 100644
--- a/db/docs/ref/debug/intro.html
+++ b/db/docs/ref/debug/intro.html
@@ -1,18 +1,18 @@
-
-
+
+
Berkeley DB Reference Guide: Introduction
-
+
- Berkeley DB Reference Guide:
- Debugging Applications
|
-
+ |
|
Introduction
@@ -28,32 +28,32 @@ you with debugging applications and reporting bugs to us so that we can
provide you with the correct answer or fix as quickly as possible.
When you encounter a problem, there are a few general actions you can
take:
-
-- Review the Berkeley DB error output
- If an error output mechanism has been configured in the Berkeley DB
+
+- Review the Berkeley DB error output
- If an error output mechanism has been configured in the Berkeley DB
environment, additional run-time error messages are made available to
the applications. If you are not using an environment, it is well worth
modifying your application to create one so that you can get more
detailed error messages. See Run-time error
information for more information on configuring Berkeley DB to output these
error messages.
-
- Review DB_ENV->set_verbose
- Check the list of flags for the DB_ENV->set_verbose function, and
+
- Review DB_ENV->set_verbose
- Check the list of flags for the DB_ENV->set_verbose function, and
see if any of them will produce additional information that might help
understand the problem.
-
- Add run-time diagnostics
- You can configure and build Berkeley DB to perform run-time diagnostics. (By
+
- Add run-time diagnostics
- You can configure and build Berkeley DB to perform run-time diagnostics. (By
default, these checks are not done because they can seriously impact
performance.) See Compile-time configuration for more
information.
-
- Apply all available patches
- Before reporting a problem to Sleepycat Software, please upgrade to the
+
- Apply all available patches
- Before reporting a problem to Sleepycat Software, please upgrade to the
latest Sleepycat Software release of Berkeley DB, if possible, or at least
make sure you have applied any updates available for your release from
the Sleepycat
Software web site.
-
- Run the test suite
- If you see repeated failures or failures of simple test cases, run the
+
- Run the test suite
- If you see repeated failures or failures of simple test cases, run the
Berkeley DB test suite to determine whether the distribution of Berkeley DB you are
using was built and configured correctly.
-
|
+
- Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/debug/printlog.html b/db/docs/ref/debug/printlog.html
index 7f882fbd3..42069df77 100644
--- a/db/docs/ref/debug/printlog.html
+++ b/db/docs/ref/debug/printlog.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Reviewing Berkeley DB log files
-
+
@@ -48,7 +48,7 @@ some records.
The following table presents each currently written log record type with
a brief description of the operation it describes. Any of these
record types may have the string "_debug" appended if they
-were written because DB_TXN_NOT_DURABLE was specified and the
+were written because DB_TXN_NOT_DURABLE was specified and the
system was configured with --enable-diagnostic.
@@ -58,6 +58,7 @@ system was configured with db_debug | Log debugging message. |
db_noop | This marks an operation that did nothing but update the LSN on a page. |
db_ovref | Increment or decrement the reference count for a big item. |
-db_pg_alloc | Indicates we allocated a page to a Btree. |
+db_pg_alloc | Indicates we allocated a page to a database. |
db_pg_free | Indicates we freed a page (freed pages are added to a freelist and reused). |
db_pg_freedata | Indicates we freed a page that still contained data entries (freed pages are added to a freelist and reused.) |
+db_pg_init | Indicates we reinitialized a page during a truncate. |
db_pg_new | Indicates that a page was allocated and put on the free list. |
db_pg_prepare | Indicates a new page was allocated during a child transaction of a prepared transaction. |
-db_relink | Fix prev/next chains on duplicate pages because a page was added or removed. |
dbreg_register | Records an open of a file (mapping the filename to a log-id that is used in subsequent log operations). |
+fop_create | Create a file in the file system. |
+fop_file_remove | Remove a name in the file system. |
+fop_remove | Remove a file in the file system. |
+fop_rename | Rename a file in the file system. |
+fop_write | Write bytes to an object in the file system. |
ham_chgpg | Used to adjust a cursor location when a Hash page is removed, and its elements are moved to a different Hash page. |
ham_copypage | Used when we empty a bucket page, but there are overflow pages for the bucket; one needs to be copied back into the actual bucket. |
ham_curadj | Used to adjust a cursor location when a nearby record changes in a Hash database. |
@@ -154,6 +160,6 @@ extract:
awk -f range.awk START_FILE=sf START_OFFSET=so END_FILE=ef END_OFFSET=eo log_output
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/debug/runtime.html b/db/docs/ref/debug/runtime.html
index 02705396f..3140c2095 100644
--- a/db/docs/ref/debug/runtime.html
+++ b/db/docs/ref/debug/runtime.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Run-time error information
-
+
@@ -43,6 +43,6 @@ described previously to format and display error messages to appropriate
output devices.
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/distrib/layout.html b/db/docs/ref/distrib/layout.html
index 3269139f3..f9e17ed46 100644
--- a/db/docs/ref/distrib/layout.html
+++ b/db/docs/ref/distrib/layout.html
@@ -1,12 +1,12 @@
-
-
+
+
Berkeley DB Reference Guide: Source code layout
-
+
@@ -22,7 +22,8 @@
btree | Btree access method source code |
build_unix | UNIX build directory |
build_vxworks | VxWorks build directory. |
-build_win32 | Windows build directory. |
+build_win32 | Windows 32-bit build directory. |
+build_win64 | Windows 64-bit build directory. |
clib | C library replacement functions |
common | Common Berkeley DB functions |
crypto | Cryptographic support |
@@ -58,16 +59,19 @@
libdb_java | The libdb_java shared library |
lock | Lock manager |
log | Log manager |
+mod_db4 | Apache module support |
mp | Shared memory buffer pool |
mutex | Mutexes |
os | POSIX 1003.1 operating-system specific functionality |
os_vxworks | VxWorks operating-system specific functionality |
os_win32 | Windows operating-system specific functionality |
perl | DB_File and BerkeleyDB Perl modules |
+php_db4 | PHP module support |
qam | Queue access method source code |
rep | Replication source code |
rpc_client | RPC client support |
rpc_server | RPC server utility |
+sequence | Sequence source code |
tcl | Tcl API |
test | Test suite |
txn | Transaction manager |
@@ -75,6 +79,6 @@
-Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.
+ Copyright (c) 1996-2004 Sleepycat Software, Inc. - All rights reserved.
diff --git a/db/docs/ref/distrib/port.html b/db/docs/ref/distrib/port.html
index b9aa39426..077135cea 100644
--- a/db/docs/ref/distrib/port.html
+++ b/db/docs/ref/distrib/port.html
@@ -1,12 +1,12 @@
-
+
Berkeley DB Reference Guide: Porting Berkeley DB to new architectures
-
+
|
|
|
|
|
|
|
|
|