John Scoles wrote:
Not that I am aware of.
Is auto-reconnect a specific MYSQL command of some sort or is a PERL
base command or some sort?
Can you give me an example of how it is used?
cheers
John Scoles
Patrick Galbraith wrote:
Hi there,
Is there the equivalent of an auto-reconnect with DBD::Oracle as
DBD::mysql has (appended in the connect DSN) ?
Thanks!
Patrick
John,
Hi! DBD::mysql uses mysql_auto_reconnect to connect back to MySQL if the
connection drops
$dbh= DBI->connect('DBI:mysql:test:mysql_auto_reconnect=1', $foo, $fee)...;
or of course
$dbh->{mysql_auto_reconnect};
In the perl side of the driver:
if ($this && ($ENV{MOD_PERL} || $ENV{GATEWAY_INTERFACE})) {
$this->{mysql_auto_reconnect} = 1;
}
I had this off once with a release I did, and a lot of people were very
unhappy ;)
So, whatever might give the functionality to reconnect automatically
I suppose it'd be the same as doing
unless ($dbh->ping) {
$dbh= .... connect ...
}
Thanks much,
Patrick