List:MySQL on Win32« Previous MessageNext Message »
From:Melissa Dougherty Date:February 23 2005 9:15pm
Subject:Deadlock Issue
View as plain text  
We are having a deadlock issue with a MySQL database application.  We have two different
users running transactions against the same table (INNODB table type).  The first user
issues a DELETE statement and the other user issues an INSERT.  I thought the DELETE
would only issue a row level lock, however, it is locking the table.  When the commit
from user 1 does not come right away, this causes a problem... does anyone have any
suggestions?

  User 1:
set autocommit=0;

begin;

delete from trans where val='a2';

.....(additional statement... INSERTs and/or UPDATEs)

User 2:

set autocommit=0;

begin;

insert into trans (val) values ("b4");





Melissa A Dougherty
Attachment: [text/html]
Attachment: [text/html]
Attachment: [text/html]
Thread
Deadlock IssueMelissa Dougherty23 Feb
  • Re: Deadlock IssueMauricio PĂ©rez24 Feb
  • Re: Deadlock IssueMelissa Dougherty24 Feb