1 message in com.mysql.lists.clusterNeed to rollback transaction after ti...
FromSent OnAttachments
Colin Pitrat05 Dec 2007 08:34 
Subject:Need to rollback transaction after timedout update
From:Colin Pitrat (coli@amadeus.com)
Date:12/05/2007 08:34:28 AM
List:com.mysql.lists.cluster

Hello,

I have a problem when updating a locked row and doing another operation just after. Apparently I have to rollback after an update that timed out on a lock. This is not the case with InnoDB. Where does this come from ?

On the first node I execute an update: mysql> set autocommit=0; Query OK, 0 rows affected (0.00 sec)

mysql> update City set Population=Population+1 where ID=1; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0

On the second node, I do the following: mysql> set autocommit=0; Query OK, 0 rows affected (0.00 sec)

mysql> update City set Population=Population+1 where ID=1; ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction mysql> update City set Population=Population+1 where ID=2; ERROR 1296 (HY000): Got error 4350 'Transaction already aborted' from NDBCLUSTER