summaryrefslogtreecommitdiffstats
path: root/ldap/admin
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2007-10-04 03:28:19 +0000
committerRich Megginson <rmeggins@redhat.com>2007-10-04 03:28:19 +0000
commitfe47c6722271d7bc0bc9bef37244abbc8fa2d040 (patch)
tree09c27eaa2cdab3cb2cd8bcd9908209686549d8f3 /ldap/admin
parenteb3df563b24912b913d86feb751f8034d959e9d6 (diff)
downloadds-fe47c6722271d7bc0bc9bef37244abbc8fa2d040.tar.gz
ds-fe47c6722271d7bc0bc9bef37244abbc8fa2d040.tar.xz
ds-fe47c6722271d7bc0bc9bef37244abbc8fa2d040.zip
Resolves: bug 249366
Bug Description: rhds71 - search filters returns too many entries on interger attributes value greater than 2 to the 31 Reviewed by: nkinder, nhosoi (Thanks!) Fix Description: I found a bug in my previous patch. The bt_compare function is used not only for comparing the actual key values but also for comparing raw index keys - that is, keys with the leading '=' or '*'. If comparing two keys, we should only use the syntax specific compare function if we are comparing two valid equality keys. A valid equality key begins with EQ_PREFIX and has at least one character after that. In this case, we strip off the EQ_PREFIX and pass the values to the syntax specific compare function. Otherwise, we just use a simple berval compare function that is based on memcmp. The code in index_range_read needs to use a similar comparison algorithm, so I beefed up DBTcmp. Why is this necessary? When doing a >= search or a <= search, we need to get the upper (for >=) or lower (for <=) bound for the range, which will either be the last (for >=) or first (for <=) equality key in the index. The index code uses a key of '=' to find the lower bound (which is lower than any key "=value") and a key of '>' to find the upper bound. A '=' with no value will collate before any real eq key with a value, and the ascii value of '>' is one greater than the ascii value of '='. Platforms tested: RHEL5 x86_64 Flag Day: no Doc impact: no QA impact: should be covered by regular nightly and manual testing New Tests integrated into TET: none
Diffstat (limited to 'ldap/admin')
0 files changed, 0 insertions, 0 deletions