If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Unreliable innodb transaction

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-23-10, 11:08
moazam moazam is offline
Registered User
 
Join Date: Jan 2010
Posts: 4
Unreliable innodb transaction

Hi,
I am explicitly opening innodb transactions and commit and rollback them using mysql library provided in php. Sometimes innodb transaction fail to update one table but transaction commits. I have single dedicated mysql server, I asked this question on other forums but couldn't found solution.

Here is the pseudo code

START TRANSACTION
$result1 = mysql_query('UPDATE TABLE1 SET ..... WHERE X1=10');
$result2 = mysql_query('UPDATE TABLE2 SET ..... WHERE X1=10);
$result3 = mysql_query('UPDATE TABLE3 SET ..... WHERE X1=10);

if $result1 && $result2 && $result3
mysql_query('COMMIT);
else
mysql_query('ROLLBACK');

Anyone can help me on this?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On