June 20, 2013

Comment: SELECT LOCK IN SHARE MODE and FOR UPDATE

Updating data in the same order is good strategy anyway. Yes you’re right SELECT FOR UPDATE should not deadlock with other instances if MySQL executes them same way (which it might not).

Page: Consulting for MySQL

MySQL and other databases for your application workload. Innodb Storage Engine Running transaction applications with MySQL ? Need help with deadlocks

Post: SHOW INNODB STATUS walk through

MySQL thread id 30898, query id 100626 localhost root Updating update iz set pad=’a’ where i=2 *** (1) WAITING FORFor last deadlock Innodb shows transactions which caused deadlocks, their state during deadlock, what locks they were holding and what they were waiting for

Comment: SELECT LOCK IN SHARE MODE and FOR UPDATE

… waiting for an X lock on assets since it came in between the SELECT and UPDATE statements in Transaction-1 and hence the deadlock condition. The MySQL 5.0 Reference Guide has… a single TinyInt), then as the first statement for every transaction there is an UPDATE semaphore SET lock=1; Since this is…

Post: Moving from MyISAM to Innodb or XtraDB. Basics

deadlocks well. MyISAM will not produce deadlocks for Innodb you should always see deadlocksfor long time in Innodb you want larger updates to reduce cost of transaction commit. You also may want to avoid excessive SELECT