Deadlock Issue
am 23.02.2005 22:15:17 von Melissa Dougherty------=_NextPart_000_001E_01C519C2.DD351300
Content-Type: multipart/alternative;
boundary="----=_NextPart_001_001F_01C519C2.DD351300"
------=_NextPart_001_001F_01C519C2.DD351300
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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=3D0;
begin;
delete from trans where val=3D'a2';
......(additional statement... INSERTs and/or UPDATEs)
User 2:
set autocommit=3D0;
begin;
insert into trans (val) values ("b4");
Melissa A Dougherty
------=_NextPart_001_001F_01C519C2.DD351300
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
charset=3Diso-8859-1">
MySQL=20
database application. We have two different users running =
transactions=20
against the same table (INNODB table type). The first user issues =
a DELETE=20
statement and the other user issues an INSERT. I thought the =
DELETE would=20
only issue a row level lock, however, it is locking the table. =
When the=20
commit from user 1 does not come right away, this causes a problem... =
does=20
anyone have any suggestions?
User =
1:
size=3D2>
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">set =
autocommit=3D0;
size=3D2> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">begin;
size=3D2>
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">delete from trans where=20
val=3D'a2';
size=3D2>
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">.....(additional =
statement...=20
INSERTs and/or UPDATEs)
size=3D2>
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">User =
2:
size=3D2>
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">
face=3DArial=20
size=3D2>set=20
autocommit=3D0;
size=3D2> style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">begin;
size=3D2>
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">insert into trans (val) =
values=20
("b4");
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">
Dougherty
------=_NextPart_001_001F_01C519C2.DD351300--
------=_NextPart_000_001E_01C519C2.DD351300
Content-Type: text/plain; charset=us-ascii
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
------=_NextPart_000_001E_01C519C2.DD351300--