if (op == SLAP_INDEX_ADD_OP) {
/* Add values */
+#ifdef BDB_TOOL_IDL_CACHING
if ( slapMode & SLAP_TOOL_QUICK )
rc = bdb_tool_idl_add( be, db, txn, &key, id );
else
+#endif
rc = bdb_idl_insert_key( be, db, txn, &key, id );
if ( rc == DB_KEYEXIST ) rc = 0;
} else {
static int index_nattrs;
+#ifdef BDB_TOOL_IDL_CACHING
#define bdb_tool_idl_cmp BDB_SYMBOL(tool_idl_cmp)
#define bdb_tool_idl_flush_one BDB_SYMBOL(tool_idl_flush_one)
#define bdb_tool_idl_flush BDB_SYMBOL(tool_idl_flush)
static int bdb_tool_idl_flush( BackendDB *be );
-static int bdb_tool_ix_rec( int base );
-static void * bdb_tool_index_task( void *ctx, void *ptr );
#define IDBLOCK 1024
} bdb_tool_idl_cache;
static bdb_tool_idl_cache_entry *bdb_tool_idl_free_list;
+#endif /* BDB_TOOL_IDL_CACHING */
static ID bdb_tool_ix_id;
static Operation *bdb_tool_ix_op;
static ldap_pvt_thread_mutex_t bdb_tool_index_mutex;
static ldap_pvt_thread_cond_t bdb_tool_index_cond;
+static int bdb_tool_ix_rec( int base );
+static void * bdb_tool_index_task( void *ctx, void *ptr );
+
int bdb_tool_entry_open(
BackendDB *be, int mode )
{
cursor = NULL;
}
+#ifdef BDB_TOOL_IDL_CACHING
bdb_tool_idl_flush( be );
+#endif
if( nholes ) {
unsigned i;
return e->e_id;
}
-
+#ifdef BDB_TOOL_IDL_CACHING
static int
bdb_tool_idl_cmp( const void *v1, const void *v2 )
{
return 0;
}
+#endif
static void *
bdb_tool_index_task( void *ctx, void *ptr )