16
16
require "$trunk/bin/pt-table-checksum";
18
if ( $sandbox_version eq '5.6' ) {
19
plan skip_all => 'http://bugs.mysql.com/67798';
18
if ( $sandbox_version ge '5.6' ) {
19
plan skip_all => 'Cannot disable InnoDB in MySQL 5.6';
22
diag(`$trunk/sandbox/stop-sandbox 12348 12349 >/dev/null`);
22
diag("Stopping/reconfiguring/restarting sandboxes 12348 and 12349");
23
diag(`$trunk/sandbox/stop-sandbox 12348 >/dev/null`);
23
24
diag(`SKIP_INNODB=1 $trunk/sandbox/start-sandbox master 12348 >/dev/null`);
26
diag(`$trunk/sandbox/stop-sandbox 12349 >/dev/null`);
24
27
diag(`SKIP_INNODB=1 $trunk/sandbox/start-sandbox slave 12349 12348 >/dev/null`);
26
29
my $dp = new DSNParser(opts=>$dsn_opts);
38
41
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
39
# so we need to specify --lock-wait-timeout=3 else the tool will die.
42
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
40
43
# And --max-load "" prevents waiting for status variables.
41
44
my $master_dsn = 'h=127.1,P=12348,u=msandbox,p=msandbox';
42
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
45
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
46
if ( $sandbox_version ge '5.6' ) {
47
# Before MySQL 5.6, even with the InnoDB engine off, creating an InnoDB
48
# table would simply result in:
50
# mysql> create table t (i int) engine=innodb;
51
# Query OK, 0 rows affected, 2 warnings (0.01 sec)
53
# mysql> show warnings;
54
# +---------+------+-------------------------------------------+
55
# | Level | Code | Message |
56
# +---------+------+-------------------------------------------+
57
# | Warning | 1286 | Unknown table engine 'innodb' |
58
# | Warning | 1266 | Using storage engine MyISAM for table 't' |
59
# +---------+------+-------------------------------------------+
61
# But 5.6 throws an error. So we have to create the table manually.
62
$sb->load_file('master1', "t/pt-table-checksum/samples/repl-table-myisam.sql");
63
$sb->wait_for_slaves(master => 'master1', slave => 'master2');
67
50
sub { $retval = pt_table_checksum::main(@args) },
80
63
"0 exit status (bug 996110)"
83
66
# #############################################################################
85
68
# #############################################################################
86
$sb->wipe_clean($master_dbh);
87
69
diag(`$trunk/sandbox/stop-sandbox 12349 12348 >/dev/null`);
88
70
ok($sb->ok(), "Sandbox servers") or BAIL_OUT(__FILE__ . " broke the sandbox");