Issue 2522 - (uid=*) search filter returns no entries
Summary: (uid=*) search filter returns no entries
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-15 23:24 UTC by jemiller@uchicago.edu
Modified: 2014-08-01 21:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jemiller@uchicago.edu 2003-05-15 23:24:47 UTC
Full_Name: Jonathan Eric Miller
Version: 2.1.19
OS: Solaris 8
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (128.135.99.79)


If I do a search using a filter of "(uid=*)", no entries are returned. The
following example demonstrates.

# ldapsearch '(uid=*)' dn
# extended LDIF
#
# LDAPv3
# base <> with scope sub
# filter: (uid=*)
# requesting: dn 
#

# search result
search: 2
result: 0 Success

# numResponses: 1

However, if I do a search that includes a character before the "*" such as
"(uid=j*)", it does return entries. The following example demonstrates.

# ldapsearch '(uid=j*)' dn
# extended LDIF
#
# LDAPv3
# base <> with scope sub
# filter: (uid=j*)
# requesting: dn 
#

# jemiller, People, uchicago.edu
dn: uid=jemiller,ou=People,dc=uchicago,dc=edu

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

Note, this problem doesn't occur with OpenLDAP 2.1.11, but, does with OpenLDAP
2.1.19. Note, I reloaded my directory from an LDIF file to make sure the
database files weren't corrupted. Can anyone else reproduce this?

Comment 1 Howard Chu 2003-05-16 00:09:40 UTC
Thanks, this bug was reported in ITS#2507 and the fix is already in CVS. The
fix will be in release 2.1.20. This ITS will be closed.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of jemiller@uchicago.edu

> Full_Name: Jonathan Eric Miller
> Version: 2.1.19
> OS: Solaris 8
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (128.135.99.79)
>
>
> If I do a search using a filter of "(uid=*)", no entries are
> returned. The
> following example demonstrates.


Comment 2 Kurt Zeilenga 2003-05-18 15:09:38 UTC
changed notes
changed state Open to Closed
Comment 3 Kurt Zeilenga 2003-05-21 12:25:28 UTC
changed notes
changed state Closed to Open
Comment 4 jemiller@uchicago.edu 2003-05-21 17:01:26 UTC
Howard Chu wrote me and told me that this bug is a duplicate of ITS#2507.

I just tested again with OpenLDAP 2.1.20 and found that the bug may only be
partly fixed. For example, if I do a,

ldapsearch '(uid=*)'

it now works. i.e. it returns entries whereas before it didn't return
anything.

This also works.

ldapsearch '(uid=swilson)'

However, this doesn't work.

ldapsearch '(&(uid=*)(uid=swilson))'

It doesn't return any entries. This query worked in OpenLDAP 2.1.11.

Jon

----- Original Message ----- 
From: <openldap-its@OpenLDAP.org>
To: <jemiller@uchicago.edu>
Sent: Thursday, May 15, 2003 6:24 PM
Subject: Re: (uid=*) search filter returns no entries (ITS#2522)


>
> *** THIS IS AN AUTOMATICALLY GENERATED REPLY ***
>
> Thanks for your report to the OpenLDAP Issue Tracking System.  Your
> report has been assigned the tracking number ITS#2522.
>
> One of our support engineers will look at your report in due course.
> Note that this may take some time because our support engineers
> are volunteers.  They only work on OpenLDAP when they have spare
> time.
>
> If you need to provide additional information in regards to your
> issue report, you may do so by replying to this message.  Note that
> any mail sent to openldap-its@openldap.org with (ITS#2522)
> in the subject will automatically be attached to the issue report.
>
> mailto:openldap-its@openldap.org?subject=(ITS#2522)
>
> You may follow the progress of this report by loading the following
> URL in a web browser:
>     http://www.OpenLDAP.org/its/index.cgi?findid=2522
>
> Please remember to retain your issue tracking number (ITS#2522)
> on any further messages you send to us regarding this report.  If
> you don't then you'll just waste our time and yours because we
> won't be able to properly track the report.
>
> Please note that the Issue Tracking System is not intended to
> be used to seek help in the proper use of OpenLDAP Software.
> Such requests will be closed.
>
> OpenLDAP Software is user supported.
> http://www.OpenLDAP.org/support/
>
> --------------
> Copyright 1999-2003 The OpenLDAP Foundation, All Rights Reserved.
>

Comment 5 Howard Chu 2003-05-21 19:38:38 UTC
I see the problem, thanks. One thing to note however, is this only fails when
the particular attribute is not indexed. If you're doing a lot of these
searches, you should be using an index on the relevant attribute.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
> jemiller@uchicago.edu
> Sent: Wednesday, May 21, 2003 10:00 AM
> To: openldap-its@OpenLDAP.org
> Subject: Re: (uid=*) search filter returns no entries (ITS#2522)
>
>
> Howard Chu wrote me and told me that this bug is a duplicate
> of ITS#2507.
>
> I just tested again with OpenLDAP 2.1.20 and found that the
> bug may only be
> partly fixed. For example, if I do a,
>
> ldapsearch '(uid=*)'
>
> it now works. i.e. it returns entries whereas before it didn't return
> anything.
>
> This also works.
>
> ldapsearch '(uid=swilson)'
>
> However, this doesn't work.
>
> ldapsearch '(&(uid=*)(uid=swilson))'
>
> It doesn't return any entries. This query worked in OpenLDAP 2.1.11.
>
> Jon
>
> ----- Original Message -----
> From: <openldap-its@OpenLDAP.org>
> To: <jemiller@uchicago.edu>
> Sent: Thursday, May 15, 2003 6:24 PM
> Subject: Re: (uid=*) search filter returns no entries (ITS#2522)
>
>
> >
> > *** THIS IS AN AUTOMATICALLY GENERATED REPLY ***
> >
> > Thanks for your report to the OpenLDAP Issue Tracking System.  Your
> > report has been assigned the tracking number ITS#2522.
> >
> > One of our support engineers will look at your report in due course.
> > Note that this may take some time because our support engineers
> > are volunteers.  They only work on OpenLDAP when they have spare
> > time.
> >
> > If you need to provide additional information in regards to your
> > issue report, you may do so by replying to this message.  Note that
> > any mail sent to openldap-its@openldap.org with (ITS#2522)
> > in the subject will automatically be attached to the issue report.
> >
> > mailto:openldap-its@openldap.org?subject=(ITS#2522)
> >
> > You may follow the progress of this report by loading the following
> > URL in a web browser:
> >     http://www.OpenLDAP.org/its/index.cgi?findid=2522
> >
> > Please remember to retain your issue tracking number (ITS#2522)
> > on any further messages you send to us regarding this report.  If
> > you don't then you'll just waste our time and yours because we
> > won't be able to properly track the report.
> >
> > Please note that the Issue Tracking System is not intended to
> > be used to seek help in the proper use of OpenLDAP Software.
> > Such requests will be closed.
> >
> > OpenLDAP Software is user supported.
> > http://www.OpenLDAP.org/support/
> >
> > --------------
> > Copyright 1999-2003 The OpenLDAP Foundation, All Rights Reserved.
> >
>

Comment 6 jemiller@uchicago.edu 2003-05-21 19:51:06 UTC
You're right. I added a pres index on uid and now it works (only had eq
before). Thanks.

Jon

----- Original Message ----- 
From: "Howard Chu" <hyc@highlandsun.com>
To: <jemiller@uchicago.edu>; <openldap-its@OpenLDAP.org>
Sent: Wednesday, May 21, 2003 2:38 PM
Subject: RE: (uid=*) search filter returns no entries (ITS#2522)


> I see the problem, thanks. One thing to note however, is this only fails
when
> the particular attribute is not indexed. If you're doing a lot of these
> searches, you should be using an index on the relevant attribute.
>
>   -- Howard Chu
>   Chief Architect, Symas Corp.       Director, Highland Sun
>   http://www.symas.com               http://highlandsun.com/hyc
>   Symas: Premier OpenSource Development and Support
>
> > -----Original Message-----
> > From: owner-openldap-bugs@OpenLDAP.org
> > [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
> > jemiller@uchicago.edu
> > Sent: Wednesday, May 21, 2003 10:00 AM
> > To: openldap-its@OpenLDAP.org
> > Subject: Re: (uid=*) search filter returns no entries (ITS#2522)
> >
> >
> > Howard Chu wrote me and told me that this bug is a duplicate
> > of ITS#2507.
> >
> > I just tested again with OpenLDAP 2.1.20 and found that the
> > bug may only be
> > partly fixed. For example, if I do a,
> >
> > ldapsearch '(uid=*)'
> >
> > it now works. i.e. it returns entries whereas before it didn't return
> > anything.
> >
> > This also works.
> >
> > ldapsearch '(uid=swilson)'
> >
> > However, this doesn't work.
> >
> > ldapsearch '(&(uid=*)(uid=swilson))'
> >
> > It doesn't return any entries. This query worked in OpenLDAP 2.1.11.
> >
> > Jon
> >
> > ----- Original Message -----
> > From: <openldap-its@OpenLDAP.org>
> > To: <jemiller@uchicago.edu>
> > Sent: Thursday, May 15, 2003 6:24 PM
> > Subject: Re: (uid=*) search filter returns no entries (ITS#2522)
> >
> >
> > >
> > > *** THIS IS AN AUTOMATICALLY GENERATED REPLY ***
> > >
> > > Thanks for your report to the OpenLDAP Issue Tracking System.  Your
> > > report has been assigned the tracking number ITS#2522.
> > >
> > > One of our support engineers will look at your report in due course.
> > > Note that this may take some time because our support engineers
> > > are volunteers.  They only work on OpenLDAP when they have spare
> > > time.
> > >
> > > If you need to provide additional information in regards to your
> > > issue report, you may do so by replying to this message.  Note that
> > > any mail sent to openldap-its@openldap.org with (ITS#2522)
> > > in the subject will automatically be attached to the issue report.
> > >
> > > mailto:openldap-its@openldap.org?subject=(ITS#2522)
> > >
> > > You may follow the progress of this report by loading the following
> > > URL in a web browser:
> > >     http://www.OpenLDAP.org/its/index.cgi?findid=2522
> > >
> > > Please remember to retain your issue tracking number (ITS#2522)
> > > on any further messages you send to us regarding this report.  If
> > > you don't then you'll just waste our time and yours because we
> > > won't be able to properly track the report.
> > >
> > > Please note that the Issue Tracking System is not intended to
> > > be used to seek help in the proper use of OpenLDAP Software.
> > > Such requests will be closed.
> > >
> > > OpenLDAP Software is user supported.
> > > http://www.OpenLDAP.org/support/
> > >
> > > --------------
> > > Copyright 1999-2003 The OpenLDAP Foundation, All Rights Reserved.
> > >
> >
>

Comment 7 Howard Chu 2003-05-22 00:18:06 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 8 Howard Chu 2003-05-22 07:27:57 UTC
> -----Original Message-----
> From: Jonathan Eric Miller [mailto:jemiller@uchicago.edu]
>
> Howard Chu wrote me and told me that this bug is a duplicate
> of ITS#2507.
>
> I just tested again with OpenLDAP 2.1.20 and found that the
> bug may only be
> partly fixed. For example, if I do a,
>
> ldapsearch '(uid=*)'
>
> it now works. i.e. it returns entries whereas before it didn't return
> anything.
>
> This also works.
>
> ldapsearch '(uid=swilson)'
>
> However, this doesn't work.
>
> ldapsearch '(&(uid=*)(uid=swilson))'
>
> It doesn't return any entries. This query worked in OpenLDAP 2.1.11.

This should now work for both indexed and non-indexed attributes in CVS HEAD.
Also note that this kind of search filter is non-optimal - you're better off
just using
	'(uid=swilson)'
and saving the redundant (uid=*) filter evaluation.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

Comment 9 Howard Chu 2003-05-22 17:34:32 UTC
changed notes
changed state Test to Release
Comment 10 Kurt Zeilenga 2003-05-29 16:24:03 UTC
changed notes
changed state Release to Closed
Comment 11 Howard Chu 2006-06-11 08:56:39 UTC
moved from Software Bugs to Archive.Software Bugs
Comment 12 OpenLDAP project 2014-08-01 21:06:28 UTC
user reports problem not resolved
fixed in HEAD
fixed in re21