Add --run-time to pt-table-checksum. Remove NAME_lc arg from Cxn and turn it on by default like it used to be and fix pt-kill accordingly.

This commit is contained in:
Daniel Nichter
2012-07-18 10:07:27 -06:00
parent 859a8a2390
commit 22a4068bea
4 changed files with 244 additions and 17 deletions
+3 -6
View File
@@ -103,7 +103,7 @@ sub new {
dsn_name => $dp->as_string($dsn, [qw(h P S)]),
hostname => '',
set => $args{set},
NAME_lc => $args{NAME_lc},
NAME_lc => defined $args{NAME_lc} ? $args{NAME_lc} : 1,
dbh_set => 0,
OptionParser => $o,
DSNParser => $dp,
@@ -150,11 +150,8 @@ sub set_dbh {
PTDEBUG && _d($dbh, 'Setting dbh');
# Set stuff for this dbh (i.e. initialize it).
if ( !exists $self->{NAME_lc}
|| (defined $self->{NAME_lc} && $self->{NAME_lc}) ) {
$dbh->{FetchHashKeyName} = 'NAME_lc';
}
$dbh->{FetchHashKeyName} = 'NAME_lc' if $self->{NAME_lc};
# Update the cxn's name. Until we connect, the DSN parts
# h and P are used. Once connected, use @@hostname.
my $sql = 'SELECT @@hostname, @@server_id';