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

back-sql - uniqueness constraint in ldap_entries



Hi,

I'm trying to build a mysql database based on an existing ldbm backend.
In the sample file "backsql_create.sql" for mysql (in
servers/slapd/back-sql/rdbms_depend), after the basic setup of the table
ldap_entries, there's an extra uniqueness constraint defined for the
combination of columns oc_map_id and keyval. As I understand it,
oc_map_id references ldap_oc_mappings, and keyval references whatever
table the row in ldap_oc_mappings points to. 

I'm hitting a problem in that the RDN "dc=net" is used at different
levels of our LDAP tree (some entries have two domain components, some
have three or more.) This produces at least one case where the above
uniqueness constraint is violated (same values for oc_map_id and keyval
in >1 rows,) yet the LDAP tree is valid (the DN resulting from the
sequence of RDNs is unique.)

The obvious way out of this is simply to leave out the uniqueness
constraint: my concern is whether or not this would actually break the
SQL backend code, or leave the resulting directory open to spurious
updates and resultant damage. If anyone has any input on this, I'd be
most grateful: by default, I'll probably suck it and see! 

Regards,
Peter