- Timestamp:
- 03/21/08 12:06:06 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/App-MadEye/trunk/lib/App/MadEye/Plugin/Agent/MySQLSlave.pm
r8190 r8237 15 15 my $threshold = $self->config->{config}->{threshold} or die "missing threshold"; 16 16 17 my $dbh = DBI->connect( 18 $dsn, 19 $user, 20 $password, 21 { RaiseError => 1, AutoCommit => 1 } 22 ) or return 'cannot connect'; 17 my $dbh; 18 eval { 19 $dbh = DBI->connect( 20 $dsn, 21 $user, 22 $password, 23 { RaiseError => 1, AutoCommit => 1 } 24 ) or return 'cannot connect'; 25 }; 26 if ($@) { 27 return $@; 28 } 29 23 30 my $sth = $dbh->prepare(q{SHOW SLAVE STATUS;}); 24 31 $sth->execute() or return 'DBI error: ' . $dbh->errstr;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)