Page 1 of 1

Transactions

Posted: Tue Nov 03, 2009 2:20 pm
by nutkenz
If I'm not mistaken, InnoDB supports transactions, right? Though, how would changes to MyISAM tables intermixed with changes to InnoDB tables in a single transaction be handled through Doctrine?

For example, suppose we have two tables:

BANK1_CLIENTS (InnoDB)
id
balance

BANK2_CLIENTS (MyISAM)
id
balance

BEGIN -- start transaction
UPDATE bank1_clients SET balance = balance - 400 WHERE id=4
UPDATE bank2_clients SET balance = balance + 400 WHERE id=12
ROLLBACK

What would happen? If it'd just break, are there any ways around this?

Re: Transactions

Posted: Sun Nov 08, 2009 3:49 pm
by nutkenz
Anyone?

Re: Transactions

Posted: Sun Nov 08, 2009 5:10 pm
by Weirdan
It won't break, however changes to non-transactional tables will be committed once you perform them and not during the transaction commit. This also means you won't be able to properly roll back the transaction (and if you try you would get er_warning_not_complete_rollback warning) because changes to non-transactional tables won't be rolled back ever.