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
if ( $sandbox_version lt '5.6' ) {
19
plan skip_all => 'Tests for MySQL 5.6';
22
diag(`$trunk/sandbox/stop-sandbox 12348 >/dev/null`);
23
diag(`EXTRA_DEFAULTS_FILE="$trunk/t/pt-table-checksum/samples/explicit_defaults_for_timestamp.cnf" $trunk/sandbox/start-sandbox master 12348 >/dev/null`);
25
my $dp = new DSNParser(opts=>$dsn_opts);
26
my $sb = new Sandbox(basedir => '/tmp', DSNParser => $dp);
27
my $master_dbh = $sb->get_dbh_for('master1');
30
plan skip_all => 'Cannot connect to sandbox master 12348';
33
my $master_dsn = 'h=127.1,P=12348,u=msandbox,p=msandbox';
34
my @args = ($master_dsn, '--max-load', '');
39
sub { $retval = pt_table_checksum::main(@args, qw(-t mysql.user)) },
46
"explicit_defaults_for_timestamp (bug 1163735): no error"
49
# Exit will be non-zero because of "Diffs cannot be detected because
50
# no slaves were found."
52
# #############################################################################
54
# #############################################################################
55
diag(`$trunk/sandbox/stop-sandbox 12348 >/dev/null`);
56
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");