summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/syntaxes/syntax.h
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2008-07-23 14:59:56 +0000
committerRich Megginson <rmeggins@redhat.com>2008-07-23 14:59:56 +0000
commit1ff1bd5eebed07a0720351514ffc7409fd3e367b (patch)
tree114cf1ecf262717ba6d8df2988102fbb41ceb567 /ldap/servers/plugins/syntaxes/syntax.h
parent04f8cfd493dd9fb10ed98778543edb5ba69e4476 (diff)
Resolves: bug 447353
Bug Description: RFE: search optimization and single character substring searches Reviewed by: nhosoi (Thanks!) Fix Description: When generating the index keys for a filter assertion, the key length must correspond to the position of the key in the assertion string. That is, the filter mail=jreu* should generate the first key based on the key len for the initial key, then the remainder of the keys based on the substring key len. So if the initial key len is 2, and the middle key len is 3, these keys should be generated - "^j", "jre", "reu". Noriko found a problem with my original patch - I needed to increment the nsubs number rather than simple assignment. With this patch, the filter tests and spaceinsens tests pass. Platforms tested: Fedora 8 Flag Day: no Doc impact: no
Diffstat (limited to 'ldap/servers/plugins/syntaxes/syntax.h')
-rw-r--r--ldap/servers/plugins/syntaxes/syntax.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldap/servers/plugins/syntaxes/syntax.h b/ldap/servers/plugins/syntaxes/syntax.h
index 3db32f44..fc7a2db9 100644
--- a/ldap/servers/plugins/syntaxes/syntax.h
+++ b/ldap/servers/plugins/syntaxes/syntax.h
@@ -58,9 +58,9 @@
#define SYNTAX_SI 16 /* space insensitive: used with SYNTAX_CIS */
#define SYNTAX_INT 32 /* INTEGER */
-#define SUBBEGIN 2
+#define SUBBEGIN 3
#define SUBMIDDLE 3
-#define SUBEND 2
+#define SUBEND 3
#ifndef MIN
#define MIN( a, b ) (a < b ? a : b )