[Date Prev][Date Next] [Chronological] [Thread] [Top]

problem with preconstructed queries



Hi,

I'm having trouble with openldap 2.2.26, back-sql, mysql 5.0.10

I've been using the mysql templates that came with the package. Everything
starts well.  When I try to search the directory, though, there are no
errors, but no results are found.

I think the problem might be that some of the default query templates
contain non-mysql sql (i.e. the "?" wildcard).  Here is an example generated
by starting ldap with `slapd -d 5`:


backsql_oc_get_attr_mapping(): preconstructed query "SELECT persons.name AS
cn FROM persons WHERE persons.id=? ORDER BY persons.name



I would like to change this precontructed query or substitute it with my
own, but I've had no luck.

Here is my slapd.conf:

# $OpenLDAP: pkg/ldap/servers/slapd/back-sql/rdbms_depend/mysql/slapd.conf,v
1.3.4.2 2004/01/20 23:44:21 kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include		/etc/openldap/schema/core.schema
include		/etc/openldap/schema/cosine.schema
include		/etc/openldap/schema/inetorgperson.schema

# Define global ACLs to disable default read access.

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral	ldap://root.openldap.org

pidfile		/var/lib/ldap/slapd.pid
argsfile	/var/lib/ldap/slapd.args


#######################################################################
# sql database definitions
#######################################################################

database	sql
suffix		"o=sql,c=RU"
rootdn		"cn=root,o=sql,c=RU"
rootpw		{CRYPT}oidAxlDe85oxw
directory	/var/lib/mysql
dbname	        mysql
dbuser		ldap_user
dbpasswd	u7y5!
subtree_cond	"ldap_entries.dn CONCAT('%',?)"
insentry_query	"INSERT INTO ldap_entries (dn,oc_map_id,parent,keyval) VALUES
(?,?,?,?)"
has_ldapinfo_dn_ru	no
access to * by *


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.0/134 - Release Date: 14/10/2005

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.0/134 - Release Date: 14/10/2005