Re: Possible extension for DBI error handler (fwd)
- From: lembark@xxxxxxxxxxx (Steven Lembark)
- Date: Wed, 25 Jan 2006 14:51:14 -0500
-- Tim Bunce <Tim.Bunce@xxxxxxxxx>
>> $dbh->connect_cached( @{ $meta{ $dbh } } );
>
> If the connection has failed then connect_cached() will return a new,
> different, $dbh which would be lost with the code above.
>
> To change the $dbh in the application to be this new $dbh you'd need to
> use swap_internal_handle(). If I was mad enough to try this I'd probably
> do:
> $new_dbh = $dbh->clone;
> $dbh->swap_internal_handle($new_dbh);
So much for hacking error handlers in my mail editor :-)
Why "mad enough"? The point is that if I have a long
running (months at a time) daemon then it'd be nice
not to have to restart it each time the databas is
restarted: just let HandleError deal with it and keep
on trukin...
--
Steven Lembark 85-09 90th Street
Workhorse Computing Woodhaven, NY 11421
lembark@xxxxxxxxxxx 1 888 359 3508
.
- Follow-Ups:
- Re: Possible extension for DBI error handler (fwd)
- From: Tim Bunce
- Re: Possible extension for DBI error handler (fwd)
- References:
- Re: Possible extension for DBI error handler (fwd)
- From: Steven Lembark
- Re: Possible extension for DBI error handler (fwd)
- From: Tim Bunce
- Re: Possible extension for DBI error handler (fwd)
- Prev by Date: Re: large updates and deletes
- Next by Date: Re: Possible extension for DBI error handler (fwd)
- Previous by thread: Re: Possible extension for DBI error handler (fwd)
- Next by thread: Re: Possible extension for DBI error handler (fwd)
- Index(es):
Relevant Pages
|
|