MySQL Forums
Forum List  »  InnoDB

Avoiding "Lock wait timeout exceeded"
Posted by: Richard
Date: April 28, 2008 02:21PM

Hello all,
I am having a locking issue. Here is my environment:
OS: Solaris 10 SPARC
MySQL: 5.1.22-rc running as a slave using ROW based replication.

Table information:
`scratch`.`scratch_table` = MyISAM
`prod`.`table1` = InnoDB

Here are the queries I run. Changed for simplicity.

set SESSION transaction isolation level read uncommitted;

UPDATE `scratch`.`scratch_table` a INNER JOIN `prod`.`table1` b ON a.`value1` = b.`value1` AND a.`value2` = b.`value2`
SET a.value3 = b.value3 WHERE a.value4 = 'X' and b.value4 = 'Y';

At the time of the locks it is highly likely that `prod`.`table1` was being updated through replication and the rows I was joining on were being updated or deleted. Nothing would be running queries against `scratch`.`scratch_table`. I do not care about dirty reads. Any data is good, but a timeout is bad. I thought by setting the transaction isolation I would be fine but either I am wrong or I am doing something incorrectly. I also tried setting innodb_locks_unsafe_for_binlog=1 but that caused the DB to crash. Any thoughts on what I can do to avoid the lock and the timeout it causes?

Thanks,
Richard

Options: ReplyQuote


Subject
Views
Written By
Posted
Avoiding "Lock wait timeout exceeded"
2210
April 28, 2008 02:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.