[development] Drupal db and transactions

Gabriele Turchi gabriele.turchi at l39a.com
Fri Apr 27 18:27:10 UTC 2007


Hi all.

During my experimental Oracle port, I've found a little problem, and I'm
asking some comment (or even help).

Apparently, the drupal db architecture is not designed to use db
transactions. The only way of doing something similar appear to do an
explicit lock on the needed table (function db_lock_table). This
functionality appear (at least to me) linked to mysql, and compatible
with postgres (ehm). 

Under postgres, a query is executed by default in "auto-commit" mode,
but emitting a "BEGIN" command the following commands will be in the
same transaction, until "COMMIT" or "ROLLBACK" command is sent.

Under Oracle I can choose the auto-commit mode, but I have not the same
flexibility I have under postgres. Even worse, I need the transaction
control to bind large variables (LOB).

For now, I can solve the problem with some "dirty trick" (like saving
some sort of embedded status doing db_lock_table), but, for the future,
I think that problem (clean transaction/lock support) should be
addressed...

Ok, anyway: next week I hope to be able to publish the first batch of
patches for the Oracle support in drupal 5.1. I'll publish them via this
mailing list as a request for comments/tests. If there is a better way,
please notify me.



Best Regards,
Gabriele Turchi

P.S.: I'm sorry, my English is alpha version...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6054 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20070427/ba993466/attachment.bin 


More information about the development mailing list