[Date Prev][Date Next]
Re: Back-sql, debugging
I thinkl it's finally time that you tell us what version of OpenLDAP
software you're using, and what ODBC and what RDBMS, just for the records.
I note that there's plenty of error messaging in back-sql; you get none
because the ODBC is returning none to the client. Apparently, at_query is
failing, but the ODBC can't tell why. It logs this obscure line,
IF @@TRANCOUNT > 0 ROLLBACK BEGIN TRANSACTION
which looks like the ODBC issued a rollback, and the RDBMS didn't like it.
I know some RDBMS need a commit/rollback before closing a transaction,
even when only read operations were performed. Others don't tolerate it
on read operations. AFAIK back-sql does the rollback after reads, but I
don't see any between the oc_ and the at_ queries, so it might be
something internal to the ODBC. I suggest you try another one.
> Pierangelo Masarati wrote:
>>>thanks for the answer, but I was executing slapd with -d 1 since I
>>> to work with.
>>>There is a little thing I do not understand, I got this output from
>>>backsql_get_db_conn(): first call -- reading schema map
>>>backsql_load_schema_map(): at_query 'SELECT
>>> FROM ldap_attr_mappings WHERE oc_map_id=?'
>>>backsql_load_schema_map(): objectClass 'organizationalUnit':
>>>expect_return: add=0, del=0; attributes:
>>>backsql_load_schema_map(): autoadding 'objectClass' and 'ref' mappings
>>> backsql_load_schema_map(): error executing at_query:
>>>Return code: -1
>>>But where I do not understand is that the real sql executed in the db
>>>00:00000:00019:2004/04/11 17:59:34.75 server TDS_LANG, spid 19:
>>>set textsize 64512 use GAddress
>>>00:00000:00019:2004/04/11 17:59:34.76 server TDS_LANG, spid 19:
>>>00:00000:00019:2004/04/11 17:59:34.77 server TDS_DYNP, spid 19:
>>>create proc wlkz006000 as SELECT
>>>00:00000:00019:2004/04/11 17:59:34.81 server TDS_LANG, spid 19:
>>>IF @@TRANCOUNT > 0 ROLLBACK BEGIN TRANSACTION
>> The query is above:
>> id,name,keytbl,keycol,create_proc,delete_proc,expect_return FROM
>> Do yu have ldap_oc_mappings? Does it have the requested columns? This
>> output looks really obscure to me. You may want to add a few printf
>> in back-sql before the queries are executed.
> this query work, the query that don't work, and that's not executed is
> the at_query (SELECT
> FROM ldap_attr_mappings WHERE oc_map_id=?).
> I checked the source code, and this error is printed if the execution of
> the query fail, but the query is not executed (as you can see in the
> sql output).
> So I do not understand why.