> >
> > I am running slapd built from HEAD on June 30th 2011, with back-sql
>
> Can you confirm this issue with another backend, e.g. back-bdb? Bugs
> specific to back-sql or to interaction with it could receive only marginal
> attention.
>
> p.
>
I've imported my data into a server with a bdb backend, and I see the same problem.
Looking at the code in sssvlv.c, it uses tavl_find3() to search the values, but the
code in tavl_find3() looks to me that it only works properly with an exact match
type of matching rule:
Avlnode *
tavl_find3( Avlnode *root, const void *data, AVL_CMP fcmp, int *ret )
{
   int   cmp = -1, dir;
   Avlnode *prev = root;
   while ( root != 0 && (cmp = (*fcmp)( data, root->avl_data )) != 0 ) {
      prev = root;
      dir = cmp > 0;
      root = avl_child( root, dir );
   }
   *ret = cmp;
   return root ? root : prev;
}
since the while loop terminates when the fcmp function returns 0 (i.e. exact match).
Chris