[TYPO3-dev] Idea: add transaction support to t3lib_db
Jigal van Hemert
jigal at xs4all.nl
Sat Mar 5 15:34:24 CET 2011
Hi,
On 4-3-2011 15:06, Dmitry Dulepov wrote:
> Jigal van Hemert wrote:
>> Could work if startTransaction() would return if a transaction is
>> possible.
> Not possible unfortunately:
> - START TRANSACTION is always successful (even on MyISAM)
DB class could contain knowledge about which engine / DBMS supports it.
> - checking table type would be too expensive
Then we should keep track of this information.
> Also if the transaction is not possible, what would you do? I expect,
> you would proceed anyway :)
Maybe I would proceed in a different way. You don't want to use
transactions for nothing. If you want to perform an operation which
requires that the table doesn't change between two queries you might
want to decide to lock the table (a transaction doesn't block other
operations). You way need to take expensive measure to make sure the
operation goes right. Certainly you will have to take into account that
a rollback is impossible.
--
Kind regards / met vriendelijke groet,
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh
More information about the TYPO3-dev
mailing list