mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-02-28 02:07:54 +08:00
pt-osc chunk-size-limit=0 skips tables - lp1441928
This commit is contained in:
@@ -9068,7 +9068,7 @@ sub main {
|
||||
tbl => $tbl,
|
||||
);
|
||||
PTDEBUG && _d('Table on',$slave->name(),'has', $n_rows, 'rows');
|
||||
if ( $n_rows && $n_rows > ($tbl->{chunk_size} * $limit) ) {
|
||||
if ( $limit && $n_rows && $n_rows > ($tbl->{chunk_size} * $limit) ) {
|
||||
PTDEBUG && _d('Table too large on', $slave->name());
|
||||
push @too_large, [$slave->name(), $n_rows || 0];
|
||||
}
|
||||
|
||||
@@ -715,6 +715,25 @@ ok(
|
||||
"--statistics --execute"
|
||||
) or diag($test_diff);
|
||||
|
||||
# #############################################################################
|
||||
# --chunk-size-limit=0 must not skip tables that would be chunked
|
||||
# in one nibble
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1441928
|
||||
# #############################################################################
|
||||
|
||||
($output, $exit) = full_output(
|
||||
sub { pt_online_schema_change::main(@args,
|
||||
"$dsn,D=sakila,t=actor", qw(--chunk-size-limit 0 --alter-foreign-keys-method drop_swap --execute --alter ENGINE=InnoDB)) },
|
||||
stderr => 1,
|
||||
);
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/Successfully altered/i,
|
||||
"--chunk-size-limit=0 doesn't skip tables - lp1441928"
|
||||
);
|
||||
|
||||
|
||||
# #############################################################################
|
||||
# --default-engine
|
||||
# #############################################################################
|
||||
|
||||
Reference in New Issue
Block a user