From 59cd0023354b66e1ce1b39eb512b21f42881b81e Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Mon, 8 Apr 2013 10:13:56 -0300 Subject: [PATCH 1/3] Fix for 1156867: pt-stalk doesn't print the function name being used --- bin/pt-stalk | 2 +- t/pt-stalk/pt-stalk.t | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/pt-stalk b/bin/pt-stalk index da84995b..73a4751f 100755 --- a/bin/pt-stalk +++ b/bin/pt-stalk @@ -1255,7 +1255,7 @@ stalk() { cycles_true=0 fi - local msg="Check results: $OPT_VARIABLE=$value, matched=${matched:-no}, cycles_true=$cycles_true" + local msg="Check results: $OPT_FUNCTION($OPT_VARIABLE)=$value, matched=${matched:-no}, cycles_true=$cycles_true" if [ "$matched" ]; then log "$msg" else diff --git a/t/pt-stalk/pt-stalk.t b/t/pt-stalk/pt-stalk.t index b5f5e85d..7373ffbd 100644 --- a/t/pt-stalk/pt-stalk.t +++ b/t/pt-stalk/pt-stalk.t @@ -120,7 +120,7 @@ PerconaTest::kill_program(pid_file => $pid_file); $output = `cat $log_file 2>/dev/null`; unlike( $output, - qr/Check results: Threads_running=\d+, matched=no, cycles_true=0/, + qr/Check results: status\(Threads_running\)=\d+, matched=no, cycles_true=0/, "Non-matching results not logged because --verbose=2" ) or diag(`cat $log_file 2>/dev/null`, `cat $dest/*-output 2>/dev/null`); @@ -153,7 +153,7 @@ PerconaTest::kill_program(pid_file => $pid_file); $output = `cat $log_file 2>/dev/null`; like( $output, - qr/Check results: Threads_running=\d+, matched=no, cycles_true=0/, + qr/Check results: status\(Threads_running\)=\d+, matched=no, cycles_true=0/, "Matching results logged with --verbose 3" ) or diag(`cat $dest/*-output 2>/dev/null`); @@ -201,7 +201,7 @@ PerconaTest::wait_until(sub { !-f $pid_file }); $output = `cat $dest/*-trigger 2>/dev/null`; like( $output, - qr/Check results: Uptime=\d+, matched=yes, cycles_true=2/, + qr/Check results: status\(Uptime\)=\d+, matched=yes, cycles_true=2/, "Collect triggered" ) or diag( @@ -304,7 +304,7 @@ is( $output = `cat $log_file 2>/dev/null`; like( $output, - qr/Check results: Aborted_connects=|variable=Aborted_connects/, + qr/Check results: status\(Aborted_connects\)=|variable=Aborted_connects/, "Read default config file" ); From 3baee0c30652655b368e86aefb6e1273f500d122 Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Wed, 17 Apr 2013 15:05:02 -0300 Subject: [PATCH 2/3] Enable optional params for pt-align --- bin/pt-align | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/pt-align b/bin/pt-align index 249ba9b5..d544058b 100755 --- a/bin/pt-align +++ b/bin/pt-align @@ -1213,6 +1213,9 @@ is easier to read. =head1 OPTIONS +This tool accepts additional command-line arguments. Refer to the +L<"SYNOPSIS"> and usage information for details. + =over =item --help From f0aedf1e5a9db3c814844ef534e17d8d9747731f Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Wed, 17 Apr 2013 15:09:50 -0300 Subject: [PATCH 3/3] pt-stalk: Mention using $prefix in plugins --- bin/pt-stalk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/pt-stalk b/bin/pt-stalk index da84995b..38731ad6 100755 --- a/bin/pt-stalk +++ b/bin/pt-stalk @@ -1936,6 +1936,10 @@ Plugins can stop the tool by setting the global variable C to C<1>. In this case, the global variable C should also be set to indicate why the tool was stopped. +Plugin writers should keep in mind that the file destination prefix currently +in use should be accessed through the C<$prefix> variable, rather than +C<$OPT_PREFIX>. + =item --port short form: -P; type: int