mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-24 13:25:01 +00:00
Remove --lock-wait-timeout from pt-table-checksum; make innodb_lock_waitout=1 a --set-vars default. Update all the ptc tests.
This commit is contained in:
@@ -40,9 +40,9 @@ elsif ( !@{$master_dbh->selectall_arrayref("show databases like 'sakila'")} ) {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3));
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3));
|
||||
my $row;
|
||||
my $output;
|
||||
my $exit_status;
|
||||
@@ -351,7 +351,7 @@ like(
|
||||
$output = output(
|
||||
sub { $exit_status = pt_table_checksum::main(
|
||||
qw(--user msandbox --pass msandbox),
|
||||
qw(-S /tmp/12345/mysql_sandbox12345.sock --lock-wait-timeout 3)) },
|
||||
qw(-S /tmp/12345/mysql_sandbox12345.sock --set-vars innodb_lock_wait_timeout=3)) },
|
||||
stderr => 1,
|
||||
);
|
||||
|
||||
|
@@ -40,9 +40,9 @@ elsif ( !$slave2_dbh ) {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3));
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3));
|
||||
my $output;
|
||||
my $exit_status;
|
||||
my $sample = "t/pt-table-checksum/samples/";
|
||||
|
@@ -27,10 +27,10 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
|
||||
$sb->create_dbs($master_dbh, ['test']);
|
||||
$sb->load_file('master', "t/lib/samples/char-chunking/ascii.sql", 'test');
|
||||
|
@@ -27,10 +27,10 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3 --explain --chunk-size 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3 --explain --chunk-size 3), '--max-load', '');
|
||||
my $output;
|
||||
my $out = "t/pt-table-checksum/samples/";
|
||||
|
||||
@@ -110,7 +110,7 @@ my $exit_status = 0;
|
||||
$output = output(sub {
|
||||
$exit_status = pt_table_checksum::main(
|
||||
$master_dsn, '--max-load', '',
|
||||
qw(--lock-wait-timeout 3 --chunk-size 5 -t ALL_UC.T)
|
||||
qw(--set-vars innodb_lock_wait_timeout=3 --chunk-size 5 -t ALL_UC.T)
|
||||
) },
|
||||
stderr => 1,
|
||||
);
|
||||
@@ -164,7 +164,7 @@ PerconaTest::wait_for_table($dbh, "bad_plan.t", "(c1,c2,c3,c4)=(1,1,2,100)");
|
||||
$output = output(sub {
|
||||
$exit_status = pt_table_checksum::main(
|
||||
$master_dsn, '--max-load', '',
|
||||
qw(--lock-wait-timeout 3 --chunk-size 10 -t bad_plan.t)
|
||||
qw(--set-vars innodb_lock_wait_timeout=3 --chunk-size 10 -t bad_plan.t)
|
||||
) },
|
||||
stderr => 1,
|
||||
);
|
||||
@@ -190,7 +190,7 @@ ok(
|
||||
sub {
|
||||
pt_table_checksum::main(
|
||||
$master_dsn, '--max-load', '',
|
||||
qw(--lock-wait-timeout 3 --chunk-size 5000 -t sakila.rental),
|
||||
qw(--set-vars innodb_lock_wait_timeout=3 --chunk-size 5000 -t sakila.rental),
|
||||
qw(--chunk-index rental_date --chunk-index-columns 2),
|
||||
qw(--explain --explain));
|
||||
},
|
||||
@@ -203,7 +203,7 @@ $output = output(
|
||||
sub {
|
||||
$exit_status = pt_table_checksum::main(
|
||||
$master_dsn, '--max-load', '',
|
||||
qw(--lock-wait-timeout 3 --chunk-size 1000 -t sakila.film_actor),
|
||||
qw(--set-vars innodb_lock_wait_timeout=3 --chunk-size 1000 -t sakila.film_actor),
|
||||
qw(--chunk-index PRIMARY --chunk-index-columns 9),
|
||||
);
|
||||
},
|
||||
@@ -220,7 +220,7 @@ $output = output(
|
||||
sub {
|
||||
$exit_status = pt_table_checksum::main(
|
||||
$master_dsn, '--max-load', '',
|
||||
qw(--lock-wait-timeout 3 --chunk-size 1000 -t sakila.film_actor),
|
||||
qw(--set-vars innodb_lock_wait_timeout=3 --chunk-size 1000 -t sakila.film_actor),
|
||||
qw(--chunk-index-columns 1 --chunk-size-limit 3),
|
||||
);
|
||||
},
|
||||
|
@@ -28,10 +28,10 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
|
||||
my $row;
|
||||
my $output;
|
||||
|
@@ -31,10 +31,10 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
|
||||
my $output;
|
||||
my $row;
|
||||
|
@@ -30,10 +30,10 @@ elsif ( !$slave1_dbh ) {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
my $output;
|
||||
my $exit_status;
|
||||
|
||||
@@ -189,7 +189,7 @@ $sb->wait_for_slaves;
|
||||
$output = output(
|
||||
sub { $exit_status = pt_table_checksum::main(
|
||||
"h=127.1,u=ro_checksum_user,p=msandbox,P=12345",
|
||||
qw(--lock-wait-timeout 3 -t mysql.user)) },
|
||||
qw(--set-vars innodb_lock_wait_timeout=3 -t mysql.user)) },
|
||||
stderr => 1,
|
||||
);
|
||||
|
||||
|
@@ -28,10 +28,10 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
|
||||
|
||||
# ############################################################################
|
||||
|
@@ -27,10 +27,10 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
my $output;
|
||||
|
||||
$sb->load_file('master', "t/pt-table-checksum/samples/float_precision.sql");
|
||||
|
@@ -24,10 +24,10 @@ if ( !$master_dbh ) {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
my $sample = "t/pt-table-checksum/samples/";
|
||||
my $row;
|
||||
my $output;
|
||||
|
@@ -31,10 +31,10 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
my $output;
|
||||
|
||||
$sb->create_dbs($master_dbh, [qw(test)]);
|
||||
|
@@ -27,10 +27,10 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
my $output;
|
||||
|
||||
# #############################################################################
|
||||
|
@@ -27,10 +27,10 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
my $output;
|
||||
my $row;
|
||||
|
||||
|
@@ -27,10 +27,10 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
my $output;
|
||||
|
||||
$sb->load_file('master', 't/pt-table-checksum/samples/issue_602.sql');
|
||||
|
@@ -57,11 +57,11 @@ like(
|
||||
"Default --host=localhost"
|
||||
);
|
||||
|
||||
like(
|
||||
$output,
|
||||
qr/^ --lock-wait-timeout\s+1$/m,
|
||||
"Default --lock-wait-timeout=1"
|
||||
);
|
||||
#like(
|
||||
# $output,
|
||||
# qr/^ --lock-wait-timeout\s+1$/m,
|
||||
# "Default --lock-wait-timeout=1"
|
||||
#);
|
||||
|
||||
like(
|
||||
$output,
|
||||
|
@@ -41,9 +41,9 @@ elsif ( !@{$master_dbh->selectall_arrayref("show databases like 'sakila'")} ) {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
my $master_dsn = 'h=127.1,P=12345';
|
||||
my @args = (qw(--lock-wait-timeout 3));
|
||||
my @args = (qw(--set-vars innodb_lock_wait_timeout=3));
|
||||
my $row;
|
||||
my $output;
|
||||
my $exit_status;
|
||||
|
@@ -41,13 +41,13 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables. Setting
|
||||
# --chunk-size may help prevent the tool from running too fast and finishing
|
||||
# before the TEST_WISHLIST job below finishes. (Or, it might just make things
|
||||
# worse. This is a random stab in the dark. There is a problem either way.)
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3),
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3),
|
||||
'--progress', 'time,1', '--max-load', '', '--chunk-size', '500');
|
||||
my $output;
|
||||
my $row;
|
||||
|
@@ -42,9 +42,9 @@ elsif ( !$sb->is_cluster_mode ) {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
my $node1_dsn = $sb->dsn_for('node1');
|
||||
my @args = ($node1_dsn, qw(--lock-wait-timeout 3));
|
||||
my @args = ($node1_dsn, qw(--set-vars innodb_lock_wait_timeout=3));
|
||||
my $output;
|
||||
my $exit_status;
|
||||
my $sample = "t/pt-table-checksum/samples/";
|
||||
|
@@ -48,10 +48,10 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
my $output;
|
||||
my $row;
|
||||
|
||||
|
@@ -31,10 +31,10 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
my $row;
|
||||
my $output;
|
||||
|
||||
|
@@ -29,10 +29,10 @@ if ( !$master_dbh ) {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
my $output;
|
||||
my $exit_status;
|
||||
|
||||
|
@@ -39,10 +39,10 @@ elsif ( !$slave_dbh ) {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12348,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '');
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '');
|
||||
my $output;
|
||||
my $retval;
|
||||
|
||||
|
@@ -31,9 +31,9 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my @args = (qw(--lock-wait-timeout 3 --explain --tables sakila.country),
|
||||
my @args = (qw(--set-vars innodb_lock_wait_timeout=3 --explain --tables sakila.country),
|
||||
'--max-load', '');
|
||||
my $cnf = "/tmp/12345/my.sandbox.cnf";
|
||||
my $pid_file = "/tmp/mk-table-checksum-test.pid";
|
||||
|
@@ -41,10 +41,10 @@ else {
|
||||
}
|
||||
|
||||
# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic
|
||||
# so we need to specify --lock-wait-timeout=3 else the tool will die.
|
||||
# so we need to specify --set-vars innodb_lock_wait_timeout=3 else the tool will die.
|
||||
# And --max-load "" prevents waiting for status variables.
|
||||
my $master_dsn = 'h=127.1,P=12345,u=msandbox,p=msandbox';
|
||||
my @args = ($master_dsn, qw(--lock-wait-timeout 3), '--max-load', '',
|
||||
my @args = ($master_dsn, qw(--set-vars innodb_lock_wait_timeout=3), '--max-load', '',
|
||||
'--progress', 'time,1');
|
||||
my $output;
|
||||
my $row;
|
||||
|
Reference in New Issue
Block a user