From: Howard Chu Date: Mon, 5 Nov 2001 07:01:12 +0000 (+0000) Subject: Fix for dbnosync - DB_TXN_NOSYNC is not a valid flag for dbenv_open, X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~901 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e47e31ad0aa7c6c2ea593af3ce7cff036024dd28;p=openldap Fix for dbnosync - DB_TXN_NOSYNC is not a valid flag for dbenv_open, must be set later using dbenv_set_flags. --- diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c index d39802d942..c996256acb 100644 --- a/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c @@ -169,7 +169,7 @@ bdb_db_open( BackendDB *be ) rc = bdb->bi_dbenv->open( bdb->bi_dbenv, bdb->bi_dbenv_home, - flags | bdb->bi_dbenv_xflags, + flags, bdb->bi_dbenv_mode ); if( rc != 0 ) { Debug( LDAP_DEBUG_ANY, @@ -178,6 +178,17 @@ bdb_db_open( BackendDB *be ) return rc; } + if( bdb->bi_dbenv_xflags != 0 ) { + rc = bdb->bi_dbenv->set_flags( bdb->bi_dbenv, + bdb->bi_dbenv_xflags, 1); + if( rc != 0 ) { + Debug( LDAP_DEBUG_ANY, + "bdb_db_open: dbenv_set_flags failed: %s (%d)\n", + db_strerror(rc), rc, 0 ); + return rc; + } + } + flags = DB_THREAD | DB_CREATE; bdb->bi_databases = (struct bdb_db_info **) ch_malloc(