Pluf Framework

Issue 277: Rollback support for MySQL

Reported by Jakub Daněk, Aug 7, 2009

This one is kinda minor, however it takes no time to fix and would 
make migrations more compatible when it comes to different dbs 
(postgresql e.g.).

MySQL supports rollback (begin, commit) SQL queries natively, 
however these functions are not implemented in Pluf_DB_MySQL (in 
PostgreSQL they are). Which means, that migrations written for Post 
are not usable when working with MySQL (if these functions are 
used). And its unnecessary.

To fix this you just have to copy those nine lines of code from 
PostgreSQL to MySQL. Unless there is another problem with it, it 
could make life easier for other users :).

With regards happy pluf user.

Comment 1 by Jakub Vitak, Aug 28, 2009

adding patch

Comment 2 by Loïc d'Anterroches, Oct 28, 2009

The thing is that MySQL has the MyISAM backend which does not 
support transactions. So, I will add a configuration variable that 
can be set to have the support of the transactions in MySQL or not.

Comment 3 by Loïc d'Anterroches, Oct 28, 2009

Fixed in commit 7185485. 

You now have the 'db_mysql_transaction' configuration variable which 
you can set to true to have the transactions enabled. By default, a 
call to commit, begin, rollback will do nothing.
Status: Fixed

Created: 5 years 1 month ago by Jakub Daněk

Updated: 4 years 10 months ago

Status: Fixed

Followed by: 3 persons

Labels:
Priority:Medium
Type:Defect