On Thu, 7 Mar 2002, Rob Bloodgood wrote:
...
> > I found the reason why my Radiator Perl module was getting stuck:
> > deadlocks when two RADIUS machines tried to update the same row in a
> > table. Anyway I'm trying to set up an alarm handler to catch this sort of
> > evilness.
>
> I have a THOUGHT, not an ANSWER:
>
> I've seen this error message once or twice while playing with PL/SQL:
> Resource busy and acquire with NOWAIT specified
>
> Meaning, there's an outstanding transaction that's blocking my
> query/update/etc.
>
> The thought is, would there be a way to specify NOWAIT to DBI, and catch
> deadlocks manually?

I've found a sort-of solution, and it's not an alarm.

$sth = $dbh->prepare ("SELECT * FROM table_to_check FOR UPDATE NOWAIT");
$rv = $sth->execute;
$sth->finish;

if ($rv != 0E0) {
 return undef;
}

# do the update down here



--
Orlando Andico <[EMAIL PROTECTED]>
Mosaic Communications, Inc.

Reply via email to