[Date Prev][Date Next]
- To: OpenLDAP-software@OpenLDAP.org
- Subject: Back-sql
- From: Mimmo Di Ianni <firstname.lastname@example.org>
- Date: Wed, 1 Jun 2005 10:57:42 +0200
- Content-disposition: inline
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=H9zU1n+GtZ3Rey8nx7y8crpYL3j5KiZWFTwu6oJa2xTQfCtfVA8mU/Im26THGjUTjsufwhzC3dpQyOngfw2EoOL3CRv1Xjr0VH5xkhusbNerFFpZmPfMoMF4+8zMv1HS+WeY1HT9AI4Ff7PV0K6P7RSGB2oawY1RAfIbAgJRAU4=
Following the instructions of OpenLDAP-POSTGRESQL HOWTO
(http://www.samse.fr/GPL/ldap_pg/HOWTO/index.html) I setup openldap
with a backend SQL.
All it seems to work but if I try to add a new entry with a
telephoneNumber attribute longer than 255 characters I do not obtain
no error from slapd.
ldapadd -D "cn=root,o=sql,c=RU" -w secret -f file.ldif
dn: cn=User Test_Add_Entry,o=sql,c=RU
sn: First Test_Add_Entry user
cn: User Test_Add_Entry
In postgres log i found:
ERROR: value too long for type character varying(255)
CONTEXT: SQL function "add_phone" statement 2)
therefore postgres finds the error but slapd seems to ignore it and
seems to insert the entry equally. However this entry does not come
given back with
ldapsearch -b "o=sql,c=RU" "(objectClass=*)".
I note that if i retry to add the same entry slapd returns:
adding new entry "cn=User Test_Add_Entry,o=sql,c=RU"
ldap_add: Already exists (68)
so this entry was added but ldapsearch don't returns it.
More in detail I noted that when I execute ldapadd spapd inserts a new
row in the
"ldap_entries" table of the database with the dn of the entry to add
but it don't updates phone and persons table. So I understand the
error that slapd returns but I think that its behavior is mistaken. In
fact i think that once the integrity of the data has not been
verified, slapd would have to give back an error and to make rollback
of all the transaction without inserts nothing in the database.
Is there anyone that knows gives an explanation to me of this behavior?
Thanks in advance.