m4_comment([$Id: dbenv.so,v 11.13 2006/04/24 17:26:34 bostic Exp $]) m4_ref_title(Upgrading m4_db Applications, Release 3.0: the DB_ENV structure,, upgrade.3.0/func, upgrade.3.0/open) m4_p([dnl The m4_ref(DbEnv) structure is now opaque for applications in the m4_db 3.0 release. Accesses to any fields within that structure by the application should be replaced with method calls. The following example illustrates this using the historic errpfx structure field. In the m4_db 2.X releases, applications set error prefixes using code similar to the following:]) m4_indent([dnl DB_ENV *dbenv; m4_blank dbenv-__GT__errpfx = "my prefix";]) m4_p([dnl in the m4_db 3.X releases, this should be done using the m4_ref(dbenv_set_errpfx) method, as follows:]) m4_indent([dnl DB_ENV *dbenv; m4_blank dbenv-__GT__set_errpfx(dbenv, "my prefix");]) m4_p([dnl The following table lists the m4_ref(DbEnv) fields previously used by applications and the methods that should now be used to set them.]) m4_table_begin(, _center) m4_table_header(m4_ref(DbEnv) field, m4_db 3.X method) m4_table_element(db_errcall, m4_ref(dbenv_set_errcall)) m4_table_element(db_errfile, m4_ref(dbenv_set_errfile)) m4_table_element(db_errpfx, m4_ref(dbenv_set_errpfx)) m4_table_element(db_lorder, [This field was removed from the m4_ref(DbEnv) structure in the m4_db 3.0 release as no application should have ever used it. Any code using it should be evaluated for potential bugs.]) m4_table_element(db_paniccall, DB_ENV-__GT__set_paniccall) m4_table_element(db_verbose, [m4_ref(dbenv_set_verbose) m4_p([dnl Note: the db_verbose field was a simple boolean toggle, the m4_ref(dbenv_set_verbose) method takes arguments that specify exactly which verbose messages are desired.])]) m4_table_element(lg_max, m4_ref(dbenv_set_lg_max)) m4_table_element(lk_conflicts, m4_ref(dbenv_set_lk_conflicts)) m4_table_element(lk_detect, m4_ref(dbenv_set_lk_detect)) m4_table_element(lk_max, dbenv-__GT__set_lk_max) m4_table_element(lk_modes, m4_ref(dbenv_set_lk_conflicts)) m4_table_element(mp_mmapsize, m4_ref(dbenv_set_mp_mmapsize)) m4_table_element(mp_size, [m4_ref(dbenv_set_cachesize) m4_p([dnl Note: the m4_ref(dbenv_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 m4_db releases.])]) m4_table_element(tx_info, [This field was used by applications as an argument to the transaction subsystem functions. As those functions take references to a m4_ref(DbEnv) structure as arguments in the m4_db 3.0 release, it should no longer be used by any application.]) m4_table_element(tx_max, m4_ref(dbenv_set_tx_max)) m4_table_element(tx_recover, dbenv-__GT__set_tx_recover) m4_table_end m4_page_footer