* The original code performs ( n ) normalizations
* and ( n * ( n - 1 ) / 2 ) matches, which hide
* the same number of normalizations. The new code
* performs the same number of normalizations ( n )
* and ( n * ( n - 1 ) / 2 ) mem compares, far less
* expensive than an entire match, if a match is
* equivalent to a normalization and a mem compare ...
*
* This is far more memory expensive than the previous,
* but it can heavily improve performances when big
* chunks of data are added (typical example is a group
* with thousands of DN-syntax members; on my system:
* for members of 5-RDN DNs,
members orig bvmatch (dirty) new
1000 0m38.456s 0m0.553s 0m0.608s
2000 2m33.341s 0m0.851s 0m1.003s
* Moreover, 100 groups with 10000 members each were
* added in 37m27.933s (an analogous LDIF file was
* loaded into Active Directory in 38m28.682s, BTW).
*
* Maybe we could switch to the new algorithm when
* the number of values overcomes a given threshold?
*/
Apparently, we refuse to index ;binary attributes. That is mostly
bogus. Whether it is indexable or not depends on whether we know how
to or not, nothing more. I.e., the existance of indexer and filter
functions for the matching rules that are relevant to the attribute
type.
if needed. This is controlled by SLAP_MR_VALUE_IS_IN_MR_SYNTAX,
a new flag that should be set when evaluating filters such as in
searches and compares and unset otherwise (such as in modify).
Now, some callers of value_match, notably value_find, don't know
whether to set it or not. We'll see to that.
Add syntax normalizer, separate from matching rule normalizer.
with mr normalizer defaulting to syntax normalizer. This allows
for more consistent handling of some syntaxes, such as directoryString
(where all matches should ignore leading, trailing, and other extra
spaces).
SASL mech removed from backend bind callback (as SASL is managed by frontend)
Changes to some backends are untested (as I don't have all dependent
software install)
incorrect because value_cmp() in value.c compares two attributes by
comparing the leading bytes of the two values (candidate and filter) up to
the smaller of the two lengths of the binary values. If the lengths of two
SYNTAX_BIN values differ, like SYNTAX_CES and SYNTAX_CIS, the EQUALITY
comparison should fail.
It also appears that value_ncmp() in value.c has no references anywhere in
the openLDAP source tree, save for a definition in proto-slap.h. The
following fix the bug and remove the dead code:
From: "MCGARRAHAN, KENNETH L" <km4155@momail.sbc.com>