|
|
sybperl-l Archive
Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Timeouts
Date: Jan 3 2003 4:58PM
On Fri, 2003-01-03 at 08:34, Matthew.Persico@Lazard.com wrote:
> Is there a way, with DBD::Sybase, on a statement handle level, to either detect
> a lock or set a timeout on a statement execution?
>
> Our situation is that we have two competing processes that sometimes deadlock,
> which we can detect and retry.
>
> Other times, one process gets the lock and the other waits forever. We'd rather
> detect the page/table lock, and abort the statement.
>
> If we cannot detect the page/table lock, we want to set a timeout on the
> statement.
>
See the "timeout" connection property.
However I realize now that this should really be a database handle
attribute, settable as needed (right now you can only set this at
DBI->connect() time, unfortunately).
Once a timeout has been seen you should cancel the request (probably via
$sth->finish) (although the default error handler may already do this
for you...)
Michael
--
Michael Peppler Data Migrations, Inc.
mpeppler@peppler.org http://www.mbay.net/~mpeppler
Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or
long term contract positions - http://www.mbay.net/~mpeppler/resume.html
|