Share » Forums » Developer » eZ API: nested transactions,...

eZ API: nested transactions, transaction unsafe methods

eZ API: nested transactions, transaction unsafe methods

Monday 05 May 2008 12:00:37 pm - 2 replies

Modified on Monday 05 May 2008 12:04:38 pm by Piotrek Karaś

Author Message

Gaetano Giunta

Monday 05 May 2008 2:07:15 pm

Transactions are not really nested, as the underlying support in the db drivers varies so much from one db to the other that it would be impossible to get it acceptably reliable across implementations.

What happens is that the outer transaction gets committed at the end, the inner ones do not.

Also if any of the inner transactions gets rolled back (ie. $db->rollback(); ), the complete transaction stack gets rolled back.

Principal Consultant International Business
Member of the Community Project Board

Piotrek Karaś

Monday 05 May 2008 2:36:30 pm

Gaetano,

Thanks for the explanation!

<i>Transactions are not really nested...</i>
Yes, I did expect that, but it seemed to describe best what appears to happen (or rather what the code looks like) ;)

<i>What happens is that the outer transaction gets committed at the end, the inner ones do not. Also if any of the inner transactions gets rolled back (ie. $db->rollback(); ), the complete transaction stack gets rolled back.</i>
Is that a standard MySQL behavior, or some eZ mechanism supporting it? Couldn't find MySQL manual analyzing such scenario...

Cheers,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu