4
die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n"
5
unless $ENV{PERCONA_TOOLKIT_BRANCH} && -d $ENV{PERCONA_TOOLKIT_BRANCH};
6
unshift @INC, "$ENV{PERCONA_TOOLKIT_BRANCH}/lib";
10
use warnings FATAL => 'all';
11
use English qw(-no_match_vars);
16
require "$trunk/bin/pt-table-checksum";
18
my $dp = new DSNParser(opts=>$dsn_opts);
19
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
20
my $master_dbh = $sb->get_dbh_for('master');
21
my $slave_dbh = $sb->get_dbh_for('slave1');
24
plan skip_all => 'Cannot connect to sandbox master';
26
elsif ( !$slave_dbh ) {
27
plan skip_all => 'Cannot connect to sandbox slave';
35
my $cnf='/tmp/12345/my.sandbox.cnf';
36
my $cmd = "$trunk/bin/pt-table-checksum -F $cnf 127.1";
38
# #############################################################################
39
# Issue 1319: mk-table-checksum -w causes perl error
40
# #############################################################################
41
$output = `$trunk/bin/pt-table-checksum h=127.1,P=12345,u=msandbox,p=msandbox P=12346 -d mysql -t user --slave-lag -w 60 2>&1`;
45
qr/Odd number of elements/,
46
"--wait doesn't cause error (issue 1319)"
49
# #############################################################################
51
# #############################################################################