Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 175897

Summary: filter'd search not returning matches after index added
Product: Red Hat Directory Server Reporter: To Ngan <tngan>
Component: Database - Indexes/SearchesAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED NEXTRELEASE QA Contact: Orla Hegarty <ohegarty>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: nkinder, rmeggins, schetty, tao
Target Milestone: DS8.0   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-05-26 20:12:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 152373, 159328, 182367, 182630, 184343, 240316    
Attachments:
Description Flags
Forwarded email for reference
none
cvs commit message
none
cvs commit message (Directory71RtmBranch & Directory621RtmBranch)
none
cvs diff filter/{filter.ksh, tet_scen}
none
cvs commit message none

Comment 3 Noriko Hosoi 2005-12-16 02:46:41 UTC
This type of filter (&(attr1 <= val1)(attr2 >= val2)) is not an optimizable case
(like (&(attr1 >= val1)(attr1 <= val2)), but it was considered it was and sent
to a wrong function.

Index: filterindex.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/filterindex.c,v
retrieving revision 1.4
diff -t -w -U4 -r1.4 filterindex.c
--- filterindex.c       19 Apr 2005 22:07:38 -0000      1.4
+++ filterindex.c       16 Dec 2005 02:41:09 -0000
@@ -639,9 +639,10 @@
     if (le_count != 1 || ge_count != 1 || f_count != 2)
     {
         is_bounded_range = 0;
     }
-    if (NULL == fpairs[0] || NULL == fpairs[1])
+    if (NULL == fpairs[0] || NULL == fpairs[1] ||
+        0 != strcmp(tpairs[0], tpairs[1]) /* avoid "&(cn<=A)(sn>=B)" type */ )
     {
         fpairs[0] = fpairs[1] = NULL;
         slapi_ch_free_string(&tpairs[0]);
         slapi_ch_bvfree(&vpairs[0]);


Comment 4 Noriko Hosoi 2005-12-16 17:39:08 UTC
Created attachment 122331 [details]
cvs commit message

Reviewed by Rich and David (Thank you!)

Comment 5 Noriko Hosoi 2005-12-16 17:42:34 UTC
Added DS7.1 and DS6.21 to the block list...

Comment 6 Noriko Hosoi 2005-12-19 20:29:18 UTC
*** Bug 175982 has been marked as a duplicate of this bug. ***

Comment 7 Noriko Hosoi 2005-12-19 21:44:27 UTC
Created attachment 122426 [details]
cvs commit message (Directory71RtmBranch & Directory621RtmBranch)

Checked in into Directory71RtmBranch & Directory621RtmBranch, as well.

Comment 8 Noriko Hosoi 2005-12-22 01:02:10 UTC
Created attachment 122510 [details]
cvs diff filter/{filter.ksh, tet_scen}

Adding the range searches to the filter test.

Comment 9 Noriko Hosoi 2005-12-22 01:36:32 UTC
Created attachment 122511 [details]
cvs commit message

Reviewed by To (Thank you!)

Checked in into the trunk as well as Directory71RtmBranch.

Comment 10 Orla Hegarty 2006-01-23 23:48:00 UTC
Per todays bug council; setting target tracking bug to 7.2 so that they will be
verified by QE against that release.

Comment 11 Orla Hegarty 2006-02-21 18:48:50 UTC
This bug is listed for inclusion in DS 7.1 SP 2 ; adding the patch to the
blockers list.

Comment 12 To Ngan 2006-02-23 19:35:01 UTC
This fix applies to DS 6.21 SP3 as well... adding blockage to the tracking bug.

Comment 13 Orla Hegarty 2006-02-24 21:51:32 UTC
Verified fixed in DS 7.1 SP 2 on Solaris 32 and 64 bit, HP-UX 11i  64 bit, RHEL
3 32 bit and RHEL 4 32 bit. 

Leaving open for now, pending verification against DS 6.21 SP 3 and it's
supported platforms.

Comment 14 Noriko Hosoi 2006-03-09 00:39:56 UTC
*DOCS*
There was a problem in evaluating intersection of multiple range searches when
the attribute of each range search is different from each other.  E.g., &(attr1
<= val1)(attr2 >= val2)  The bug was fixed on DS 6.21 SP3, DS 7.1 SP2 (and DS 7.2).

Comment 15 To Ngan 2006-03-14 15:22:55 UTC
Verified candidate 20060310.1 on all platforms.

Comment 17 Orla Hegarty 2006-05-26 17:49:30 UTC
Somehow the errata system did not automatically close these bugs even though DS
SP 2 is shipped and available live on RHN

Comment 18 Orla Hegarty 2006-05-26 17:52:49 UTC
trying to manually close

Comment 19 Orla Hegarty 2006-05-26 20:12:48 UTC
trying again

Comment 21 Chandrasekar Kannan 2007-07-25 19:19:35 UTC
DS7.2 is not a valid milestone anymore. Anything thats set to DS7.2 should be
set to DS8.0. Will make further changes per bug council on 07/24/2007, after this.

Comment 22 Chandrasekar Kannan 2008-08-11 23:43:22 UTC
Bug already CLOSED. setting screened+ flag