From 1d42a09196dd825fdc46a254dc989ceede3b4618 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Fri, 1 Mar 2013 19:02:13 -0700 Subject: [PATCH] Remove --lock-wait-timeout from pt-table-checksum; make innodb_lock_waitout=1 a --set-vars default. Update all the ptc tests. --- bin/pt-table-checksum | 51 +------------------- t/pt-table-checksum/basics.t | 6 +-- t/pt-table-checksum/bugs.t | 4 +- t/pt-table-checksum/char_chunking.t | 4 +- t/pt-table-checksum/chunk_index.t | 14 +++--- t/pt-table-checksum/chunk_size.t | 4 +- t/pt-table-checksum/create_replicate_table.t | 4 +- t/pt-table-checksum/error_handling.t | 6 +-- t/pt-table-checksum/filters.t | 4 +- t/pt-table-checksum/float_precision.t | 4 +- t/pt-table-checksum/fnv_64.t | 4 +- t/pt-table-checksum/ignore_columns.t | 4 +- t/pt-table-checksum/issue_388.t | 4 +- t/pt-table-checksum/issue_47.t | 4 +- t/pt-table-checksum/issue_602.t | 4 +- t/pt-table-checksum/option_sanity.t | 10 ++-- t/pt-table-checksum/privs.t | 4 +- t/pt-table-checksum/progress.t | 4 +- t/pt-table-checksum/pxc.t | 4 +- t/pt-table-checksum/replication_filters.t | 4 +- t/pt-table-checksum/resume.t | 4 +- t/pt-table-checksum/run_time.t | 4 +- t/pt-table-checksum/skip_innodb.t | 4 +- t/pt-table-checksum/standard_options.t | 4 +- t/pt-table-checksum/throttle.t | 4 +- 25 files changed, 60 insertions(+), 107 deletions(-) diff --git a/bin/pt-table-checksum b/bin/pt-table-checksum index fd85cb80..d701defd 100755 --- a/bin/pt-table-checksum +++ b/bin/pt-table-checksum @@ -8838,43 +8838,7 @@ sub main { . "level to REPEATABLE-READ.\n"; } - # We set innodb_lock_wait_timeout=1 (the option's default value) - # so that if this tool happens to cause some locking, it will more - # likely be the victim than other connections and thus avoid disrupting - # the server. The var is only dynamic with the InnoDB plugin, so - # if setting it fails we only warn if the server's value is greater - # than the desired value. E.g. if user does --lock-wait-timeout 5 - # and the set fails but the server's value is 1, then that's ok, but - # if the server's value is 10, then that's not ok. - my $lock_wait_timeout = $o->get('lock-wait-timeout'); - my $set_lwt = "SET SESSION innodb_lock_wait_timeout=$lock_wait_timeout"; - PTDEBUG && _d($dbh, $set_lwt); - eval { - $dbh->do($set_lwt); - }; - if ( $EVAL_ERROR ) { - PTDEBUG && _d($EVAL_ERROR); - # Get the server's current value. - $sql = "SHOW SESSION VARIABLES LIKE 'innodb_lock_wait_timeout'"; - PTDEBUG && _d($dbh, $sql); - my (undef, $curr_lwt) = $dbh->selectrow_array($sql); - PTDEBUG && _d('innodb_lock_wait_timeout on server:', $curr_lwt); - if ( !defined $curr_lwt ) { - PTDEBUG && _d('innodb_lock_wait_timeout does not exist;', - 'InnoDB is probably disabled'); - } - elsif ( $curr_lwt > $lock_wait_timeout ) { - warn "Failed to $set_lwt: $EVAL_ERROR\n" - . "The current innodb_lock_wait_timeout value " - . "$curr_lwt is greater than the --lock-wait-timeout " - . "value $lock_wait_timeout and the variable cannot be " - . "changed. innodb_lock_wait_timeout is only dynamic when " - . "using the InnoDB plugin. To prevent this warning, either " - . "specify --lock-wait-time=$curr_lwt, or manually set " - . "innodb_lock_wait_timeout to a value less than or equal " - . "to $lock_wait_timeout and restart MySQL.\n"; - } - } + return; }; # Do not call "new Cxn(" directly; use this sub so that set_on_connect @@ -11637,18 +11601,6 @@ type: string; group: Filter Ignore tables whose names match the Perl regex. -=item --lock-wait-timeout - -type: int; default: 1 - -Set the session value of C on the master host. -This option helps guard against long lock waits if the checksum queries -become slow for some reason. Setting this option dynamically requires the -InnoDB plugin, so this works only on newer InnoDB and MySQL versions. If -setting the value fails and the current server value is greater than the -specified value, then a warning is printed; else, if the current server -value is less than or equal to the specified value, no warning is printed. - =item --max-lag type: time; default: 1s; group: Throttle @@ -11918,6 +11870,7 @@ By default, the tool sets: MAGIC_set_vars wait_timeout=10000 + innodb_lock_wait_timeout=1 Variables specified on the command line override these defaults. For example, specifying C<--set-vars wait_timeout=500> overrides the defaultvalue of C<10000>. diff --git a/t/pt-table-checksum/basics.t b/t/pt-table-checksum/basics.t index 5fc74e83..51695ca8 100644 --- a/t/pt-table-checksum/basics.t +++ b/t/pt-table-checksum/basics.t @@ -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, ); diff --git a/t/pt-table-checksum/bugs.t b/t/pt-table-checksum/bugs.t index 83d00843..a2f74326 100644 --- a/t/pt-table-checksum/bugs.t +++ b/t/pt-table-checksum/bugs.t @@ -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/"; diff --git a/t/pt-table-checksum/char_chunking.t b/t/pt-table-checksum/char_chunking.t index 4739eaeb..3b92bc8e 100644 --- a/t/pt-table-checksum/char_chunking.t +++ b/t/pt-table-checksum/char_chunking.t @@ -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'); diff --git a/t/pt-table-checksum/chunk_index.t b/t/pt-table-checksum/chunk_index.t index 8ddefaae..5433401e 100644 --- a/t/pt-table-checksum/chunk_index.t +++ b/t/pt-table-checksum/chunk_index.t @@ -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), ); }, diff --git a/t/pt-table-checksum/chunk_size.t b/t/pt-table-checksum/chunk_size.t index cb170bfb..5c9b8be4 100644 --- a/t/pt-table-checksum/chunk_size.t +++ b/t/pt-table-checksum/chunk_size.t @@ -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; diff --git a/t/pt-table-checksum/create_replicate_table.t b/t/pt-table-checksum/create_replicate_table.t index 7f9d27e4..fff69ebf 100644 --- a/t/pt-table-checksum/create_replicate_table.t +++ b/t/pt-table-checksum/create_replicate_table.t @@ -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; diff --git a/t/pt-table-checksum/error_handling.t b/t/pt-table-checksum/error_handling.t index cbc95202..3289cd11 100644 --- a/t/pt-table-checksum/error_handling.t +++ b/t/pt-table-checksum/error_handling.t @@ -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, ); diff --git a/t/pt-table-checksum/filters.t b/t/pt-table-checksum/filters.t index f9ea4a90..4bfd1d6b 100644 --- a/t/pt-table-checksum/filters.t +++ b/t/pt-table-checksum/filters.t @@ -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', ''); # ############################################################################ diff --git a/t/pt-table-checksum/float_precision.t b/t/pt-table-checksum/float_precision.t index 3f0166ae..def0fc5d 100644 --- a/t/pt-table-checksum/float_precision.t +++ b/t/pt-table-checksum/float_precision.t @@ -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"); diff --git a/t/pt-table-checksum/fnv_64.t b/t/pt-table-checksum/fnv_64.t index 386395d9..b2423395 100644 --- a/t/pt-table-checksum/fnv_64.t +++ b/t/pt-table-checksum/fnv_64.t @@ -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; diff --git a/t/pt-table-checksum/ignore_columns.t b/t/pt-table-checksum/ignore_columns.t index 51116d0f..244e6268 100644 --- a/t/pt-table-checksum/ignore_columns.t +++ b/t/pt-table-checksum/ignore_columns.t @@ -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)]); diff --git a/t/pt-table-checksum/issue_388.t b/t/pt-table-checksum/issue_388.t index d348d157..e2fb24af 100644 --- a/t/pt-table-checksum/issue_388.t +++ b/t/pt-table-checksum/issue_388.t @@ -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; # ############################################################################# diff --git a/t/pt-table-checksum/issue_47.t b/t/pt-table-checksum/issue_47.t index 26ea63d1..344a3f3d 100644 --- a/t/pt-table-checksum/issue_47.t +++ b/t/pt-table-checksum/issue_47.t @@ -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; diff --git a/t/pt-table-checksum/issue_602.t b/t/pt-table-checksum/issue_602.t index 70de9c1e..b9230ffa 100644 --- a/t/pt-table-checksum/issue_602.t +++ b/t/pt-table-checksum/issue_602.t @@ -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'); diff --git a/t/pt-table-checksum/option_sanity.t b/t/pt-table-checksum/option_sanity.t index 58de51bd..50f9dc95 100644 --- a/t/pt-table-checksum/option_sanity.t +++ b/t/pt-table-checksum/option_sanity.t @@ -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, diff --git a/t/pt-table-checksum/privs.t b/t/pt-table-checksum/privs.t index 52f8e5c0..103bf9a9 100644 --- a/t/pt-table-checksum/privs.t +++ b/t/pt-table-checksum/privs.t @@ -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; diff --git a/t/pt-table-checksum/progress.t b/t/pt-table-checksum/progress.t index c4c5eb64..6b4c3316 100644 --- a/t/pt-table-checksum/progress.t +++ b/t/pt-table-checksum/progress.t @@ -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; diff --git a/t/pt-table-checksum/pxc.t b/t/pt-table-checksum/pxc.t index e6c3407c..a49c75d9 100644 --- a/t/pt-table-checksum/pxc.t +++ b/t/pt-table-checksum/pxc.t @@ -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/"; diff --git a/t/pt-table-checksum/replication_filters.t b/t/pt-table-checksum/replication_filters.t index 334de0e0..b2710d6d 100644 --- a/t/pt-table-checksum/replication_filters.t +++ b/t/pt-table-checksum/replication_filters.t @@ -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; diff --git a/t/pt-table-checksum/resume.t b/t/pt-table-checksum/resume.t index ed50b0fd..f6753a09 100644 --- a/t/pt-table-checksum/resume.t +++ b/t/pt-table-checksum/resume.t @@ -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; diff --git a/t/pt-table-checksum/run_time.t b/t/pt-table-checksum/run_time.t index 7f269161..69704149 100644 --- a/t/pt-table-checksum/run_time.t +++ b/t/pt-table-checksum/run_time.t @@ -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; diff --git a/t/pt-table-checksum/skip_innodb.t b/t/pt-table-checksum/skip_innodb.t index 4bd99354..da2b90b1 100644 --- a/t/pt-table-checksum/skip_innodb.t +++ b/t/pt-table-checksum/skip_innodb.t @@ -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; diff --git a/t/pt-table-checksum/standard_options.t b/t/pt-table-checksum/standard_options.t index 9f34421f..a1c2c987 100644 --- a/t/pt-table-checksum/standard_options.t +++ b/t/pt-table-checksum/standard_options.t @@ -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"; diff --git a/t/pt-table-checksum/throttle.t b/t/pt-table-checksum/throttle.t index ff335369..3ee6aa58 100644 --- a/t/pt-table-checksum/throttle.t +++ b/t/pt-table-checksum/throttle.t @@ -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;