Merge lp:~percona-toolkit-dev/percona-toolkit/pt-mysql-summary-Blank-InnoDB-Section-for-5.6-1254233 into lp:percona-toolkit/2.2

Proposed by Frank Cizmich
Status: Merged
Approved by: Daniel Nichter
Approved revision: 599
Merged at revision: 601
Proposed branch: lp:~percona-toolkit-dev/percona-toolkit/pt-mysql-summary-Blank-InnoDB-Section-for-5.6-1254233
Merge into: lp:percona-toolkit/2.2
Diff against target: 33 lines (+9/-2)
2 files modified
bin/pt-mysql-summary (+2/-2)
t/pt-mysql-summary/pt-mysql-summary.t (+7/-0)
To merge this branch: bzr merge lp:~percona-toolkit-dev/percona-toolkit/pt-mysql-summary-Blank-InnoDB-Section-for-5.6-1254233
Reviewer Review Type Date Requested Status
Daniel Nichter Approve
Review via email: mp+220870@code.launchpad.net

Description of the change

pt-mysql-summary stopped printing InnoDB section for MySQL 5.6
This was because it checked for the "have_innodb" variable which was removed in 5.6
Solved by also checking for "innodb_version".

To post a comment you must log in.
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Does this work because in the branch we have:

if [ "${have_innodb}" = "YES" ] || [ -n "${innodb_version}" ]; then

which is not same as:

if [[ "${have_innodb}" = "YES" || "${innodb_ver}" > "5.6.1" ]]; then

i.e. in branch we only check if innodb_version is set, but in Michael's patch we check if it's > 5.6.1.

Revision history for this message
Frank Cizmich (frank-cizmich) wrote :

It works just as well. I just reasoned that we only need verify that
there is *some* version of innodb present, not really important which.

On 05/27/2014 01:18 PM, Daniel Nichter wrote:
> Does this work because in the branch we have:
>
> if [ "${have_innodb}" = "YES" ] || [ -n "${innodb_version}" ]; then
>
> which is not same as:
>
> if [[ "${have_innodb}" = "YES" || "${innodb_ver}" > "5.6.1" ]]; then
>
> i.e. in branch we only check if innodb_version is set, but in Michael's patch we check if it's > 5.6.1.

--
Frank Cizmich, Software Engineer, Percona
Tel: +1-888-401-3401 Ext: 630
Skype: percona.fcizmich
Montevideo, Uruguay (UTC -3)
www.percona.com
www.mysqlperformanceblog.com

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

True.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/pt-mysql-summary'
2--- bin/pt-mysql-summary 2014-02-20 08:10:16 +0000
3+++ bin/pt-mysql-summary 2014-05-25 02:42:03 +0000
4@@ -2328,9 +2328,9 @@
5
6 section "InnoDB"
7 local have_innodb="$(get_var "have_innodb" "$dir/mysql-variables")"
8- if [ "${have_innodb}" = "YES" ]; then
9+ local innodb_version="$(get_var "innodb_version" "$dir/mysql-variables")"
10+ if [ "${have_innodb}" = "YES" ] || [ -n "${innodb_version}" ]; then
11 section_innodb "$dir/mysql-variables" "$dir/mysql-status"
12-
13 if [ -s "$dir/innodb-status" ]; then
14 format_innodb_status "$dir/innodb-status"
15 fi
16
17=== modified file 't/pt-mysql-summary/pt-mysql-summary.t'
18--- t/pt-mysql-summary/pt-mysql-summary.t 2013-12-12 05:49:59 +0000
19+++ t/pt-mysql-summary/pt-mysql-summary.t 2014-05-25 02:42:03 +0000
20@@ -60,6 +60,13 @@
21 "--databases works"
22 );
23
24+like(
25+ $out,
26+ qr/# InnoDB #.*Version.*# MyISAM #/s,
27+ "InnoDB section present"
28+);
29+
30+
31 # --read-samples
32 for my $i (2..7) {
33 ok(

Subscribers

People subscribed via source and target branches