diff --git a/bin/pt-mysql-summary b/bin/pt-mysql-summary index 5b73dc4e..025b6a1f 100755 --- a/bin/pt-mysql-summary +++ b/bin/pt-mysql-summary @@ -2265,7 +2265,7 @@ report_jemalloc_enabled() { local GENERAL_JEMALLOC_STATUS=0 local JEMALLOC_LOCATION='' - for PID in $(pidof mysqld); do + for pid in $(pidof mysqld); do grep -qc jemalloc /proc/${pid}/environ || ldd $(which mysqld) 2>/dev/null | grep -qc jemalloc jemalloc_status=$? if [ $jemalloc_status = 1 ]; then diff --git a/lib/bash/report_mysql_info.sh b/lib/bash/report_mysql_info.sh index 0f874932..a523ef1f 100644 --- a/lib/bash/report_mysql_info.sh +++ b/lib/bash/report_mysql_info.sh @@ -1269,7 +1269,7 @@ report_jemalloc_enabled() { local GENERAL_JEMALLOC_STATUS=0 local JEMALLOC_LOCATION='' - for PID in $(pidof mysqld); do + for pid in $(pidof mysqld); do grep -qc jemalloc /proc/${pid}/environ || ldd $(which mysqld) 2>/dev/null | grep -qc jemalloc jemalloc_status=$? if [ $jemalloc_status = 1 ]; then @@ -1576,7 +1576,7 @@ report_mysql_summary () { local keyring_plugins="$(collect_keyring_plugins)" local encrypted_tables="" local encrypted_tablespaces="" - if [ ${OPT_LIST_ENCRYPTED_TABLES} == 'yes' ]; then + if [ "${OPT_LIST_ENCRYPTED_TABLES}" = 'yes' ]; then encrypted_tables="$(collect_encrypted_tables)" encrypted_tablespaces="$(collect_encrypted_tablespaces)" fi diff --git a/t/pt-mysql-summary/pt-mysql-summary_encryption.t b/t/pt-mysql-summary/pt-mysql-summary_encryption.t index b8f510ed..dd941819 100644 --- a/t/pt-mysql-summary/pt-mysql-summary_encryption.t +++ b/t/pt-mysql-summary/pt-mysql-summary_encryption.t @@ -105,7 +105,7 @@ for my $i (2..7) { }, "t/pt-mysql-summary/samples/expected_output_temp_enc00$i.txt", ), - "--read-samples works for t/pt-mysql-summary/temp00$i", + "--read-samples works for t/pt-mysql-summary/temp_enc00$i", ) or diag($test_diff); } @@ -153,6 +153,8 @@ like( "Encrypted tablespaces included in report" ) or diag $out; +$master_dbh->do("DROP TABLE IF EXISTS test.t1"); +$master_dbh->do("DROP TABLE IF EXISTS test.t2"); $master_dbh->do("DROP DATABASE IF EXISTS test"); $master_dbh->do("DROP TABLESPACE foo"); diff --git a/t/pt-mysql-summary/samples/expected_output_temp002.txt b/t/pt-mysql-summary/samples/expected_output_temp002.txt index b7b7a5e2..9c90dae0 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp002.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp002.txt @@ -277,3 +277,4 @@ report-port = 12345 log-error = mysqld.log innodb_lock_wait_timeout = 3 # Memory management library ################################## +# The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp003.txt b/t/pt-mysql-summary/samples/expected_output_temp003.txt index e5b20824..64f0cd8c 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp003.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp003.txt @@ -220,3 +220,4 @@ report-port = 12345 log-error = mysqld.log innodb_lock_wait_timeout = 3 # Memory management library ################################## +# The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp004.txt b/t/pt-mysql-summary/samples/expected_output_temp004.txt index 55cd02a8..5ca8f669 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp004.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp004.txt @@ -219,3 +219,4 @@ report-port = 12345 log-error = mysqld.log innodb_lock_wait_timeout = 3 # Memory management library ################################## +# The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp005.txt b/t/pt-mysql-summary/samples/expected_output_temp005.txt index 3f48c826..fcfb9121 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp005.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp005.txt @@ -292,3 +292,4 @@ report-port = 12345 log-error = mysqld.log innodb_lock_wait_timeout = 3 # Memory management library ################################## +# The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp006.txt b/t/pt-mysql-summary/samples/expected_output_temp006.txt index 10b79804..9ce23275 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp006.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp006.txt @@ -341,3 +341,4 @@ log_queries_not_using_indexes | OFF # Configuration File ######################################### Config File | Cannot autodetect or find, giving up # Memory management library ################################## +# The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp007.txt b/t/pt-mysql-summary/samples/expected_output_temp007.txt index bd784839..efab17f4 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp007.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp007.txt @@ -295,3 +295,4 @@ log_queries_not_using_indexes | OFF # Configuration File ######################################### Config File | Cannot autodetect or find, giving up # Memory management library ################################## +# The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp_enc002.txt b/t/pt-mysql-summary/samples/expected_output_temp_enc002.txt index 33621026..e112c13b 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp_enc002.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp_enc002.txt @@ -282,5 +282,4 @@ report-port = 12345 log-error = mysqld.log innodb_lock_wait_timeout = 3 # Memory management library ################################## -Jemalloc library not found # The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp_enc003.txt b/t/pt-mysql-summary/samples/expected_output_temp_enc003.txt index 301c0e3f..909b1fef 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp_enc003.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp_enc003.txt @@ -225,5 +225,4 @@ report-port = 12345 log-error = mysqld.log innodb_lock_wait_timeout = 3 # Memory management library ################################## -Jemalloc library not found # The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp_enc004.txt b/t/pt-mysql-summary/samples/expected_output_temp_enc004.txt index 5ef0a955..89b13d84 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp_enc004.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp_enc004.txt @@ -224,5 +224,4 @@ report-port = 12345 log-error = mysqld.log innodb_lock_wait_timeout = 3 # Memory management library ################################## -Jemalloc library not found # The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp_enc005.txt b/t/pt-mysql-summary/samples/expected_output_temp_enc005.txt index d15262ce..98776caa 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp_enc005.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp_enc005.txt @@ -297,5 +297,4 @@ report-port = 12345 log-error = mysqld.log innodb_lock_wait_timeout = 3 # Memory management library ################################## -Jemalloc library not found # The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp_enc006.txt b/t/pt-mysql-summary/samples/expected_output_temp_enc006.txt index 0b927f58..ced33d67 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp_enc006.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp_enc006.txt @@ -346,5 +346,4 @@ log_queries_not_using_indexes | OFF # Configuration File ######################################### Config File | Cannot autodetect or find, giving up # Memory management library ################################## -Jemalloc library not found # The End #################################################### diff --git a/t/pt-mysql-summary/samples/expected_output_temp_enc007.txt b/t/pt-mysql-summary/samples/expected_output_temp_enc007.txt index 60425d5f..b0decdc6 100644 --- a/t/pt-mysql-summary/samples/expected_output_temp_enc007.txt +++ b/t/pt-mysql-summary/samples/expected_output_temp_enc007.txt @@ -300,5 +300,4 @@ log_queries_not_using_indexes | OFF # Configuration File ######################################### Config File | Cannot autodetect or find, giving up # Memory management library ################################## -Jemalloc library not found # The End #################################################### diff --git a/t/pt-table-checksum/pt-136.t b/t/pt-table-checksum/pt-136.t index 7124c9df..6d02a8e7 100644 --- a/t/pt-table-checksum/pt-136.t +++ b/t/pt-table-checksum/pt-136.t @@ -27,12 +27,11 @@ else { plan tests => 2; } +$dbh->do("DROP TABLE IF EXISTS percona.checksums"); $sb->load_file('master', 't/pt-table-checksum/samples/pt-136.sql'); -# The sandbox servers run with lock_wait_timeout=3 and it's not dynamic -# 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. +$sb->wait_for_slaves(); my $master_dsn = $sb->dsn_for('master'); -my @args = ($master_dsn); +my @args = ($master_dsn, '--databases', 'db1', '--no-replicate-check'); my $output; my $exit_status; @@ -44,8 +43,9 @@ $output = output( is( $exit_status, 0, - "Checksum columns with mismatching collaitons", -); + "Checksum columns with mismatching collations", +) or BAIL_OUT("debug time"); + # ############################################################################# # Done.