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