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]