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

Slapd generate SQL by PostgreSQL based syntax



Hi

I use openldap slapd 2.4.40 + MySQL5.5 as back-sql on CentoS 6.9

It seems slapd generate PostgreSQL based syntax SQL 

Here is the error message for ldapsearch -x  -b "dc=example,dc=com"
'(objectClass=*)'

5b70e25c <==backsql_srch_query() returns SELECT DISTINCT
ldap_entries.id,eduperson.id,text('inetOrgPerson') AS
objectClass,ldap_entries.dn AS dn FROM ldap_entries,eduperson WHERE
eduperson.id=ldap_entries.keyval AND ldap_entries.oc_map_id=? AND 9=9 AND
3=3
5b70e25c Constructed query: SELECT DISTINCT
ldap_entries.id,eduperson.id,text('inetOrgPerson') AS
objectClass,ldap_entries.dn AS dn FROM ldap_entries,eduperson WHERE
eduperson.id=ldap_entries.keyval AND ldap_entries.oc_map_id=? AND 9=9 AND
3=3
5b70e25c id: '3'
5b70e25c backsql_oc_get_candidates(): error executing query
5b70e25c Return code: -1
5b70e25c    nativeErrCode=1064 SQLengineState=37000
msg="[unixODBC][MySQL][ODBC 5.1 Driver][mysqld-5.5.57]You have an error in
your SQL syntax; check the manual that corresponds to your MySQL server
version for the right syntax to use near '('inetOrgPerson') AS
objectClass,ldap_entries.dn AS dn FROM ldap_entries,edupers' at line 1"
5b70e25c send_ldap_result: conn=1000 op=1 p=3
5b70e25c send_ldap_result: err=80 matched="" text=""
5b70e25c send_ldap_response: msgid=2 tag=101 err=80

I take same message as I execute below from MySQL console.

I can see text('inetOrgPerson') in the SQL which was generated by slapd
however,MySQL doesn’t support text() function in its SQL.

When I use Postgeresql as back-sql it works properly
Is it a bug or setting error for some directives?





#########################################
一般財団法人
  日本建設情報総合センター(JACIC:ジャシック)
  建設副産物・発生土情報交換システム担当
 国際土木委員会 事務局担当 

   システムエンジニアリング部

    横山 善行

   電話 03-3505-2661  FAX 03-3589-6258
    mail   yokoyamy@jacic.or.jp

########################################