Fatal error if slave dies. Make Cxn::connect() if dbh id dead. Sort slave lag properly and use Cxn instead of dbh in ReplicaLagWaiter. Check master cxn before keepalive. Sleep N+0.25 waiting for chunks.

This commit is contained in:
Daniel Nichter
2011-10-10 10:56:08 -06:00
parent eae742ee78
commit b2f92391a7
5 changed files with 107 additions and 48 deletions

View File

@@ -87,7 +87,7 @@ sub connect {
my $o = $self->{OptionParser};
my $dbh = $self->{dbh};
if ( !$dbh ) {
if ( !$dbh || !$dbh->ping() ) {
# Ask for password once.
if ( $o->get('ask-pass') && !$self->{asked_for_pass} ) {
$dsn->{p} = OptionParser::prompt_noecho("Enter MySQL password: ");