bdb->bi_txn = 1; /* default to using transactions */
#ifndef NO_THREADS
+#if 0
bdb->bi_lock_detect = DB_LOCK_NORUN;
+#else
+ bdb->bi_lock_detect = DB_LOCK_DEFAULT;
+#endif
#endif
ldap_pvt_thread_mutex_init( &bdb->bi_database_mutex );
/* close db environment */
if( bdb->bi_dbenv ) {
-
/* force a checkpoint */
if( bdb->bi_txn ) {
rc = TXN_CHECKPOINT( bdb->bi_dbenv, 0, 0, DB_FORCE );
if(rc != 0) {
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "backend_startup: bi_db_open failed!\n" ));
+ "backend_startup: bi_db_open failed! (%d)\n", rc ));
#else
Debug( LDAP_DEBUG_ANY,
- "backend_startup: bi_db_open failed!\n",
- 0, 0, 0 );
+ "backend_startup: bi_db_open failed! (%d)\n",
+ rc, 0, 0 );
#endif
return rc;
}
if(rc != 0) {
#ifdef NEW_LOGGING
LDAP_LOG(( "backend", LDAP_LEVEL_CRIT,
- "backend_startup: bi_db_open %d failed!\n", i ));
+ "backend_startup: bi_db_open(%d) failed! (%d)\n",
+ i, rc ));
#else
Debug( LDAP_DEBUG_ANY,
- "backend_startup: bi_db_open %d failed!\n",
- i, 0, 0 );
+ "backend_startup: bi_db_open(%d) failed! (%d)\n",
+ i, rc, 0 );
#endif
return rc;
}