]> git.sur5r.net Git - openldap/commitdiff
Still need DB_AUTO_COMMIT flag
authorHoward Chu <hyc@openldap.org>
Sat, 22 Mar 2003 16:21:44 +0000 (16:21 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 22 Mar 2003 16:21:44 +0000 (16:21 +0000)
servers/slapd/back-bdb/dbcache.c
servers/slapd/back-bdb/init.c

index a9ac40efa5f333d8a44928fa94c1ec83f586933f..5a07911d6d45a8369354008d7513c188464056bc 100644 (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 );
index ec95cfc42b160501a9d0e313e07c1f84481cc204..039934c474f5f1e9ae015add97a882a53fb202ad 100644 (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