Skip Menu |

This queue is for tickets about the Ima-DBI CPAN distribution.

Report information
The Basics
Id: 5439
Status: new
Priority: 0/
Queue: Ima-DBI

People
Owner: Nobody in particular
Requestors: martin [...] hybyte.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.31
Fixed in: (no value)



Subject: maybe Bug (or documentation?) / should there be access to DBI->{InactiveDestroy) or should errors be catched
seen on freebsd, with mysql 4.0.17, DBI and DBD uptodate The following can happen: If you have an object, with an active connection to the db; and then fork your programm, either process can close the connection. Ima:DBI will normally reestablish the connection in the remaining process, as the ping will fail. This does not apply, if the 2nd process closes the connection, between the ping and the sth->execute. In this case Ima::DBI will die. Is this behavior wanted, or should this error, be caught? Also should there be easier access to InactiveDestroy, other than through db_*->{InctiveDestroy}?
Show quoted text
> If you have an object, with an active connection to the db; and then > fork your programm, either process can close the connection.
"Doctor it hurts when I do this" ... I don't really deal with forking very much, but I think the best approach is to do your connecting after you fork rather than before. I'm more inclined to add a note to the docs rather than do something to the code... Show quoted text
> Also should there be easier access to InactiveDestroy, other than > through db_*->{InctiveDestroy}?
I've never needed such, but I'm open to persuasion... Thanks, Tony