[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Inserting an entry in LDAP with SQL as backend - Atomicity?
Hello!
"Anandi D. Herlekar" wrote:
> Hello,
>
> While going through back-sql modification code, we found that the code
> for addition of one ldap entry, many tables corresponding to the
> attributes of the objectclass of the entry are modified individually. How is the
> atomicity of updations of all these tables assured?
It could be easily assured with use of transaction, but they are not supported in
mySQL.
Also, please read FAQ about LDAP vs RDBMS (see the link in the docs or in maillists
archives) - back-sql shurely can't fully conform to LDAP (though for most RDBMSes
this issue resolves easily).
>
> Also, while inserting an entry into LDAP using the sample databases
> provided for MySQL we are getting following error:
Sorry for confusion, mySQL does not support stored procedures, which makes it
impossible to support writes in the way back-sql tries.
That query is a trace of my investigations on this point, which occasianally got
into samples...
More accurate:
back-sql currently executes a single 'insert statement', and expects it to return
new ID as OUT parameter. Usually the statement is a call to stored procedure.
to make back-sql add something to mySQL, you will have to patch the insert process
to execute 4 explicit statements:
lock table ...
insert ...
select last_insert_id()
unlock table
the 3rd statement returns desired ID as a result set (not parameter)
WBW, Dmitry