|
|
sybperl-l Archive
Up Prev Next
From: abe dot crabtree at citicorp dot com
Subject: RE: forcing a deadlock
Date: May 17 2002 8:16AM
I haven't done this via sybperl, but I don't think that's significant.
The time I did this I had exactly what you do, except with WHILE loops to keep
the queries going until a deadlock.
I had them in SPs (temporary test ones.)
I'd start one in isql and leave it running, and then run my database client
that called the other (temporary SP,) and it would deadlock fairly reliably, so
I was able to test my deadlock detection and resubmission.
How's that?
I hope it helps,
Regards,
Abe Crabtree
-----Original Message-----
From: leew [mailto:leew@roanoketimes.com]
Sent: 16 May 2002 18:53
To: SYBPERL-L
Cc: leew
Subject: forcing a deadlock
Can anyone give me some ideas on forcing a deadlock to occur? I need this to
test error handling.
Im able to cause a deadlock manually by using two sql sessions, with both
sessions lockstepping thru this:
begin tran begin tran
update table1 set field1 = first update table2 set field1 =
second
update table2 set field1 = first update table1 set field1 =
second
commit tran commit tran
Id like to do the same thing using sybperl, but cant seem to cause a
deadlock, I only get one process blocked.
Thanks,
LeeW
|