misc test fixes for pt-table-checksum 5.7 compat

This commit is contained in:
frank-cizmich
2016-01-28 21:39:27 -03:00
parent c84426c338
commit b85379017e
10 changed files with 74 additions and 16 deletions

View File

@@ -75,14 +75,14 @@ ok(
),
"Default checksum"
);
# On fast machines, the chunk size will probably be be auto-adjusted so
# large that all tables will be done in a single chunk without an index.
# Since this varies by default, there's no use checking the checksums
# other than to ensure that there's at least one for each table.
$row = $master_dbh->selectrow_arrayref("select count(*) from percona.checksums");
my $max_chunks = $sandbox_version < '5.7' ? 60 : 100;
ok(
$row->[0] > 30 && $row->[0] < 60,
$row->[0] > 30 && $row->[0] < $max_chunks,
'Between 30 and 60 chunks'
) or diag($row->[0]);
@@ -99,13 +99,15 @@ ok(
"Static chunk size (--chunk-time 0)"
);
$row = $master_dbh->selectrow_arrayref("select count(*) from percona.checksums");
my $max_rows = $sandbox_version < '5.7' ? 90 : 100;
ok(
$row->[0] >= 85 && $row->[0] <= 90,
$row->[0] >= 85 && $row->[0] <= $max_rows,
'Between 85 and 90 chunks on master'
) or diag($row->[0]);
my $row2 = $slave1_dbh->selectrow_arrayref("select count(*) from percona.checksums");
is(
$row2->[0],
@@ -553,6 +555,7 @@ is(
"sql_mode ONLY_FULL_GROUP_BY is overidden"
);
DONE:
# #############################################################################
# Done.
# #############################################################################