[ldb] [PATCH] LDB_SCOPE_ONELVEL indexing
simo
idra at samba.org
Mon Dec 11 01:36:12 GMT 2006
On Mon, 2006-12-11 at 11:20 +1100, tridge at samba.org wrote:
> Simo,
>
> > This patch implements indexing for one level searches but only if
> > explicitly activated by adding an attribute called @IDXONE to the
> > @INDEXLIST special object.
>
> This certainly ended up a lot simpler than I expected!
Yeah and I explicitly coded it up to have the minimum impact on the
code.
> A few things could be improved though. The ldb_msg_find_idx() calls
> for LTDB_IDXONE seem a bit silly. I think a flag in ltdb->cache makes
> more sense.
I thought about this, but the way I built the patch made the least
impact on the code.
> I also think we could get rid of the ltdb_index_dn_one() function,
> which is the most complex function in the patch. Instead, we could do
> the onelevel indexing before the attribute indexing in
> ltdb_search_indexed(), and call ltdb_index_dn_and().
We could but ltdb_index_dn_and() clears the dn_list.
I just wanted to make a patch without touching anything else, but I can
optimize if you think it is better that way.
Simo.
--
Simo Sorce
Samba Team GPL Compliance Officer
email: idra at samba.org
http://samba.org
More information about the samba-technical
mailing list