MySQL Forums
Forum List  »  Perl

Re: Bin Log Trimmer script dies if unable to connect to a server ?
Posted by: Hu Hailin
Date: July 11, 2006 09:28PM

DBI->connect will not die even connection is failed, so you could check the $dbh1 before you deal with anything with it. Like this:

foreach $server ( @server_list ) {
  my $dbh1 = DBI->connect(...);
  next unless $dbh1;

  # do what ever you want to do
  ...
}

Options: ReplyQuote


Subject
Written By
Posted
Re: Bin Log Trimmer script dies if unable to connect to a server ?
July 11, 2006 09:28PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.