Still need DB_AUTO_COMMIT flag

This commit is contained in:
Howard Chu 2003-03-22 16:21:44 +00:00
parent c37a3b37b8
commit 23d69c1d1f
2 changed files with 6 additions and 3 deletions

View File

@ -52,6 +52,7 @@ bdb_db_cache(
{
int i;
int rc;
int flags;
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
struct bdb_db_info *db;
char *file;
@ -111,9 +112,11 @@ bdb_db_cache(
#ifdef HAVE_EBCDIC
__atoe( file );
#endif
flags = bdb->bi_db_opflags | DB_CREATE | DB_THREAD;
if ( !tid ) flags |= DB_AUTO_COMMIT;
rc = DB_OPEN( db->bdi_db, tid,
file, name,
DB_HASH, bdb->bi_db_opflags | DB_CREATE | DB_THREAD,
DB_HASH, flags,
bdb->bi_dbenv_mode );
ch_free( file );

View File

@ -384,14 +384,14 @@ bdb_db_open( BackendDB *be )
path,
/* bdbi_databases[i].name, */ NULL,
bdbi_databases[i].type,
bdbi_databases[i].flags | flags,
bdbi_databases[i].flags | flags | DB_AUTO_COMMIT,
bdb->bi_dbenv_mode );
#else
rc = DB_OPEN( db->bdi_db, NULL,
bdbi_databases[i].file,
/* bdbi_databases[i].name, */ NULL,
bdbi_databases[i].type,
bdbi_databases[i].flags | flags,
bdbi_databases[i].flags | flags | DB_AUTO_COMMIT,
bdb->bi_dbenv_mode );
#endif