From 93c11e451b8f33075ffcfbd4872a4603ec988505 Mon Sep 17 00:00:00 2001 From: Frank Cizmich Date: Sat, 24 May 2014 23:34:37 -0300 Subject: [PATCH] fixes absent InnoDB section in pt-mysql-summary for MySQL 5.6 - issue 1254233 --- bin/pt-mysql-summary | 4 ++-- t/pt-mysql-summary/pt-mysql-summary.t | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bin/pt-mysql-summary b/bin/pt-mysql-summary index 3ba6cc8d..39aaac86 100755 --- a/bin/pt-mysql-summary +++ b/bin/pt-mysql-summary @@ -2328,9 +2328,9 @@ report_mysql_summary () { section "InnoDB" local have_innodb="$(get_var "have_innodb" "$dir/mysql-variables")" - if [ "${have_innodb}" = "YES" ]; then + local innodb_version="$(get_var "innodb_version" "$dir/mysql-variables")" + if [ "${have_innodb}" = "YES" ] || [ -n "${innodb_version}" ]; then section_innodb "$dir/mysql-variables" "$dir/mysql-status" - if [ -s "$dir/innodb-status" ]; then format_innodb_status "$dir/innodb-status" fi diff --git a/t/pt-mysql-summary/pt-mysql-summary.t b/t/pt-mysql-summary/pt-mysql-summary.t index 79e4328b..48f1c0ae 100644 --- a/t/pt-mysql-summary/pt-mysql-summary.t +++ b/t/pt-mysql-summary/pt-mysql-summary.t @@ -60,6 +60,13 @@ like( "--databases works" ); +like( + $out, + qr/# InnoDB #.*Version.*# MyISAM #/s, + "InnoDB section present" +); + + # --read-samples for my $i (2..7) { ok(