e = str2entry( data.dptr );
ldbm_datum_free( id2entry->dbc_db, data );
+ if( e != NULL ) {
+ e->e_id = id;
+ }
+
return e;
}
ID id )
{
int rc;
- Entry *e = ldbm_tool_entry_get( be, id );
+ Entry *e;
+
+ Debug( LDAP_DEBUG_ARGS, "=> ldbm_tool_entry_reindex( %ld )\n",
+ (long) id, 0, 0 );
- if( e == NULL ) return -1;
+ e = ldbm_tool_entry_get( be, id );
+
+ if( e == NULL ) {
+ Debug( LDAP_DEBUG_ANY,
+ "ldbm_tool_entry_reindex:: could not locate id=%ld\n",
+ (long) id, 0, 0 );
+ return -1;
+ }
/*
* just (re)add them for now
* will zap index databases
*
*/
+
+ Debug( LDAP_DEBUG_TRACE, "=> ldbm_tool_entry_reindex( %ld, \"%s\" )\n",
+ id, e->e_dn, 0 );
+
rc = index_entry_add( be, e, e->e_attrs );
entry_free( e );
directory ./test-db
rootdn "cn=Manager, o=University of Michigan, c=US"
rootpw secret
-index objectClass eq
+index objectclass eq
index cn,sn,uid pres,eq,sub
dbnosync
dbnolocking
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
-# $SLAPADD -f $MCONF -l $LDIF
-$SLAPADD -f $CONF -l $LDIF
+$SLAPADD -f $MCONF -l $LDIF
RC=$?
if test $RC != 0 ; then
echo "slapadd failed ($RC)!"
exit $RC
fi
-# echo "Running slapindex to index slapd database..."
-# $SLAPINDEX -f $CONF
-# RC=$?
-# if test $RC != 0 ; then
-# echo "slapindex failed ($RC)!"
-# exit $RC
-# fi
+echo "Running slapindex to index slapd database..."
+$SLAPINDEX -f $CONF
+RC=$?
+if test $RC != 0 ; then
+ echo "slapindex failed ($RC)!"
+ exit $RC
+fi
echo "Starting slapd on TCP/IP port $PORT..."
$SLAPD -f $CONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &