head 1.2; access; symbols RPM_4_2_1:1.1.1.5 RPM_4_2:1.1.1.5 RPM_4_1_1:1.1.1.5 RPM_4_1:1.1.1.4 RPM_4_0_5:1.1.1.3 RPM_4_0_4:1.1.1.2 RPM_4_0_3:1.1.1.1 RPM:1.1.1; locks; strict; comment @# @; 1.2 date 2008.01.02.09.55.58; author rse; state dead; branches; next 1.1; commitid z4cpSiAhOCXk5PLs; 1.1 date 2001.07.23.20.45.38; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.07.23.20.45.38; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2002.01.08.00.30.12; author rse; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2003.01.18.13.49.04; author rse; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2001.10.15.03.47.35; author rse; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 2003.01.18.14.05.00; author rse; state Exp; branches; next ; desc @@ 1.2 log @remove the ancient RPM 4.2.1 source tree copy @ text @
|
![]() ![]() ![]() |
The DB_INFO structure has been removed from the Berkeley DB 3.0 release. Accesses to any fields within that structure by the application should be replaced with method calls on the DB handle. The following example illustrates this using the historic db_cachesize structure field. In the Berkeley DB 2.X releases, applications could set the size of an underlying database cache using code similar to the following:
DB_INFO dbinfo;memset(dbinfo, 0, sizeof(dbinfo)); dbinfo.db_cachesize = 1024 * 1024;
in the Berkeley DB 3.X releases, this should be done using the DB->set_cachesize method, as follows:
DB *db; int ret;ret = db->set_cachesize(db, 0, 1024 * 1024, 0);
The DB_INFO structure is no longer used in any way by the Berkeley DB 3.0 release, and should be removed from the application.
The following table lists the DB_INFO fields previously used by applications and the methods that should now be used to set them. Because these calls provide configuration for the database open, they must precede the call to DB->open. Calling them after the call to DB->open will return an error.
DB_INFO field | Berkeley DB 3.X method |
---|---|
bt_compare | DB->set_bt_compare |
bt_minkey | DB->set_bt_minkey |
bt_prefix | DB->set_bt_prefix |
db_cachesize | DB->set_cachesize
Note: the DB->set_cachesize function takes additional arguments. Setting both the second argument (the number of GB in the pool) and the last argument (the number of memory pools to create) to 0 will result in behavior that is backward-compatible with previous Berkeley DB releases. |
db_lorder | DB->set_lorder |
db_malloc | DB->set_malloc |
db_pagesize | DB->set_pagesize |
dup_compare | DB->set_dup_compare |
flags | DB->set_flags
Note: the DB_DELIMITER, DB_FIXEDLEN and DB_PAD flags no longer need to be set as there are specific methods off the DB handle that set the file delimiter, the length of fixed-length records and the fixed-length record pad character. They should simply be discarded from the application. |
h_ffactor | DB->set_h_ffactor |
h_hash | DB->set_h_hash |
h_nelem | DB->set_h_nelem |
re_delim | DB->set_re_delim |
re_len | DB->set_re_len |
re_pad | DB->set_re_pad |
re_source | DB->set_re_source |
![]() ![]() ![]() |
Copyright Sleepycat Software @ 1.1 log @Initial revision @ text @d1 1 a1 1 @ 1.1.1.1 log @Import: RPM 4.0.3 @ text @@ 1.1.1.2 log @Import: RPM 4.0.4 @ text @d1 1 a1 1 d19 1 a19 1 replaced with method calls on the DB handle. The following d57 1 a57 1 set as there are specific methods off the DB handle that set the @ 1.1.1.3 log @Import: RPM 4.0.5 @ text @d2 1 a2 1 a3 1 d19 1 a19 1 replaced with method calls on the DB handle. The following d57 1 a57 1 set as there are specific methods off the DB handle that set the @ 1.1.1.4 log @Import: RPM 4.1 @ text @d2 1 a2 1 d4 1 d20 1 a20 1 replaced with method calls on the DB handle. The following d58 1 a58 1 set as there are specific methods off the DB handle that set the @ 1.1.1.5 log @Import: RPM 4.1.1 @ text @d2 1 a2 1 a3 1 d19 1 a19 1 replaced with method calls on the DB handle. The following d57 1 a57 1 set as there are specific methods off the DB handle that set the @