7 messages in com.mysql.lists.perlRe: perl/mysql/innodb| From | Sent On | Attachments |
|---|---|---|
| mayuran | 12 May 2004 10:47 | |
| mayuran | 12 May 2004 13:40 | |
| Jochen Wiedmann | 12 May 2004 13:41 | |
| Jochen Wiedmann | 12 May 2004 14:05 | |
| mayuran | 12 May 2004 14:12 | |
| Rudy Lippan | 12 May 2004 14:18 | |
| mayuran | 12 May 2004 14:22 |
| Subject: | Re: perl/mysql/innodb![]() |
|---|---|
| From: | Rudy Lippan (rlip...@remotelinux.com) |
| Date: | 05/12/2004 02:18:23 PM |
| List: | com.mysql.lists.perl |
On Wed, 12 May 2004, mayuran wrote:
You would probably be better served asking this question on the mysql general list as this is not a perl specific problem, and you might find more people that that might have done things like this before.
I have a perl script which fork()'s many children and each child is updating a table, and each child is inserting/updating DIFFERENT rows - I split up the work so that no two children
Look at the code here: http://lists.mysql.com/perl/2915
The update does not even touch one row but will cause a lock wait timeout.
try to update the same row so that no child has to wait for any locks to be released. The problem is, I am getting lock wait timeout's still, its not consistant - sometimes it happens sometimes it does not. It might be due to next key locking. Anyhow, has anyone tried to do something similar before ? How can I have all the children update/insert without running into lock problems.
AutoCommit would go a long way to helping with the lock wait tiemout.. And you can always replay the transactions.
Another thing that you can do is use explicit locks on the tables so that your children control who locks what and when (and don't forget to commit the tx).
Rudy




