Create ReplicaLagLimiter. Replace --max-lag, --check-interval, and --check-slave-lag with --replica-lag and --replica-lag-dsn. Use TableParser::get_table_status() in NibbleItertor. Eval SHOW TABLE STATUS. Auto-add "n" (name) part to parsed DSNs.

This commit is contained in:
Daniel Nichter
2011-09-16 17:35:40 -06:00
parent 32ade00663
commit 006b93ddf9
6 changed files with 352 additions and 131 deletions

View File

@@ -499,7 +499,11 @@ sub get_table_status {
}
MKDEBUG && _d($sql, @params);
my $sth = $dbh->prepare($sql);
$sth->execute(@params);
eval { $sth->execute(@params); };
if ($EVAL_ERROR) {
MKDEBUG && _d($EVAL_ERROR);
return;
}
my @tables = @{$sth->fetchall_arrayref({})};
@tables = map {
my %tbl; # Make a copy with lowercased keys