Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^7: Net::LDAP q

by snoopy (Curate)
on Sep 06, 2011 at 21:09 UTC ( #924465=note: print w/replies, xml ) Need Help??

in reply to Re^6: Net::LDAP q
in thread Net::LDAP q

So what happens under Net::LDAP. Was "1000" was actually being treated as less than "500"?

Update:: Did some testing and answered my own question. I populated a few uid fields in some sample data, then ran a few ranging queries using Net::LDAP. Seems that (under open LDAP at least), not only can you get different result via ldapsearch and Net::LDAP, but the LDAP server just silently ignores the query. No errors or other status information.

Replies are listed 'Best First'.
Re^8: Net::LDAP q
by fisher (Priest) on Sep 07, 2011 at 08:32 UTC
    So what happens under Net::LDAP. Was "1000" was actually being treated as less than "500"?

    No, not at all. The server just didn't knew how to actually _compare_ in this way. I did some research and found that, in fact, there is no predefined attributes in openldap that can be compared by 'less than' or 'greater than' comparators. You have to define your own attributes =)

    As to difference in behaviour, ldapsearch untility shows similar results if you give it the right search filter - that is,

    ldapsearch -h -D "cn=root,dc=lomonosov,dc=parallel,dc=ru +" -w "rootpw" -b "ou=slurm,dc=lomonosov,dc=parallel,dc=ru" "(&(cn>=60 +0)(cn<=1000))"
    i.e., it shows _nothing_ =)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://924465]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2022-05-20 06:58 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (72 votes). Check out past polls.