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

Re: sql-backend



> hi otto, pierangelo and adam,

Hi

>
> This is my slapd.conf configuration:

You slapd.conf is just perfect; however,

>
> When i come up slapd it logs this error
>
>
> ==>load_schema_map()
> ldapinfo.dn_ru field exists in the schema
> load_schema_map(): at_query 'SELECT '

apparently, when cut'n'pasting, you left
too many carriage returns and started writing
at the beginning of the following line ...

> load_schema_map(): objectClass 'inetOrgPerson': keytbl='persons'
> keycol='id' create_proc='insert into persons (name) values ('');
>  select last_insert_id();'
> expect_return: add=0, del=0; attributes:
> load_schema_map(): autoadding 'objectClass' and 'ref' mappings
> load_schema_map(): error executing at_query:

... so you got an error ...

> Return code: -1
> Native error code: 1064
> SQL engine state: 37000
> Message: [MySQL][ODBC 3.51 Driver][mysqld-3.23.58]You have an error in
> your SQL syntax near '' at line 1 ==>backsql_free_db_conn()

... there's nothing aftr "SELECT ".  The rest
is just a clean and neat shutdown that cleverly
releases all the allocated resources; I think
I've seen it too many times, recently.

> backsql_free_db_conn(): closing db connection
> ==>backsql_close_db_conn()
> <==backsql_close_db_conn()
> <==backsql_free_db_conn()
> backsql_db_open(): connection failed, exiting
> backend_startup: bi_db_open(0) failed! (1)
> slapd shutdown: initiated
> ==>backsql_db_close()
> <==backsql_db_close()
> slapd shutdown: freeing system resources.
> ==>backsql_db_destroy()
> ==>backsql_free_db_env()
> <==backsql_free_db_env()
> ==>destroy_schema_map()
> ==>free_oc(): 'inetOrgPerson'
> ==>free_attr(): 'ref'
> <==free_attr()
> ==>free_attr(): 'objectClass'
> <==free_attr()
> <==free_oc()
> <==destroy_schema_map()
> <==backsql_db_destroy()
> slapd stopped.
> connections_destroy: nothing to destroy.
>
>
> I think is good that you could explain us what does this lines means
>
>
> at_query "SELECT

you wrote it; you should explain what you meant.

> name,sel_expr,from_tbls,join_where,add_proc,delete_proc,param_order,expect_return
>  FROM ldap_attr_mappings WHERE oc_map_id=?"
> insentry_query  "insert into ldap_entries
> (id,dn,oc_map_id,parent,keyval) values ((select max(id)+1 from
> ldap_entries),?,?,?,?)"
> upper_func      "upper"
> strcast_func    "text"
> concat_pattern  "?||?"

One style suggestion: instead of adding that nice
line "end of reply" or something like that, why
don't you clean up all the useless crutf that's
left at the bottom of your emails?

p.

-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it