From: Howard Chu Date: Sat, 22 Mar 2003 16:21:44 +0000 (+0000) Subject: Still need DB_AUTO_COMMIT flag X-Git-Tag: NO_SLAP_OP_BLOCKS~74 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=23d69c1d1f4e2d54dc897932d9594be97432d654;p=openldap Still need DB_AUTO_COMMIT flag --- diff --git a/servers/slapd/back-bdb/dbcache.c b/servers/slapd/back-bdb/dbcache.c index a9ac40efa5..5a07911d6d 100644 --- a/servers/slapd/back-bdb/dbcache.c +++ b/servers/slapd/back-bdb/dbcache.c @@ -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 ); diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index ec95cfc42b..039934c474 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -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