pt-mysql-summary blank InnoDB section for 5.6

Bug #1254233 reported by Jervin R
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
High
Frank Cizmich

Bug Description

This is because have_innodb variable does not exist on 5.6 anymore.

[revin@forge ~]$ /wok/bin/pt/225/bin/pt-mysql-summary --version
pt-mysql-summary 2.2.5

[revin@forge ~]$ /wok/bin/pt/225/bin/pt-mysql-summary --defaults-file=/ssd/msb/msb_5_6_140/my.sandbox.cnf
# Percona Toolkit MySQL Summary Report #######################
              System time | 2013-11-23 04:31:42 UTC (local TZ: EST -0500)
# Instances ##################################################
  Port Data Directory Nice OOM Socket
  ===== ========================== ==== === ======
   3306 /wok/dta/mysql 0 0 /wok/dta/mysql/mysqld.sock
  56140 /ssd/msb/msb_5_6_140/data 0 0 /tmp/mysql_sandbox56140.sock
# MySQL Executable ###########################################
       Path to executable | /usr/libexec/mysqld
              Has symbols | No
       Path to executable | /wok/bin/mysql/5.6.140/bin/mysqld
              Has symbols | Yes
# Report On Port 56140 #######################################
                     User | msandbox@localhost
                     Time | 2013-11-22 23:31:42 (EST)
                 Hostname | forge.dotmanila.com
                  Version | 5.6.14-rel62.0 Percona Server with XtraDB (GPL), Release rel62.0, Revision 483
                 Built On | Linux x86_64
                  Started | 2013-11-20 02:30 (up 2+21:01:17)
                Databases | 54
                  Datadir | /ssd/msb/msb_5_6_140/data/
                Processes | 1 connected, 1 running
              Replication | Is not a slave, has 0 slaves connected
                  Pidfile | /ssd/msb/msb_5_6_140/data/mysql_sandbox56140.pid (exists)
# Processlist ################################################
...
# Percona XtraDB Cluster #####################################
# Plugins ####################################################
       InnoDB compression | ACTIVE
# Query cache ################################################
         query_cache_type | OFF
                     Size | 1.0M
                    Usage | 1%
         HitToInsertRatio | 0%
# Schema #####################################################
Would you like to mysqldump -d the schema and analyze it? y/n n
Skipping schema analysis
# Noteworthy Technologies ####################################
                      SSL | No
     Explicit LOCK TABLES | Yes
           Delayed Insert | No
          XA Transactions | No
              NDB Cluster | No
      Prepared Statements | No
 Prepared statement count | 0
# InnoDB #####################################################
# MyISAM #####################################################
                Key Cache | 8.0M
                 Pct Used | 20%
                Unflushed | 0%
# Security ###################################################
...
# The End ####################################################

[revin@forge ~]$ /wok/bin/pt/225/bin/pt-mysql-summary
# Percona Toolkit MySQL Summary Report #######################
              System time | 2013-11-23 04:26:10 UTC (local TZ: EST -0500)
# Instances ##################################################
  Port Data Directory Nice OOM Socket
  ===== ========================== ==== === ======
   3306 /wok/dta/mysql 0 0 /wok/dta/mysql/mysqld.sock
  56140 /ssd/msb/msb_5_6_140/data 0 0 /tmp/mysql_sandbox56140.sock
# MySQL Executable ###########################################
       Path to executable | /usr/libexec/mysqld
              Has symbols | No
       Path to executable | /wok/bin/mysql/5.6.140/bin/mysqld
              Has symbols | Yes
# Report On Port 3306 ########################################
                     User | root@localhost
                     Time | 2013-11-22 23:26:10 (EST)
                 Hostname | forge.dotmanila.com
                  Version | 5.5.33-cll-lve MySQL Community Server (GPL) by Atomicorp
                 Built On | Linux x86_64
                  Started | 2013-11-22 19:16 (up 0+04:10:01)
                Databases | 5
                  Datadir | /wok/dta/mysql/
                Processes | 1 connected, 1 running
              Replication | Is not a slave, has 0 slaves connected
                  Pidfile | /var/run/mysqld/mysqld.pid (exists)
# Processlist ################################################
...
# Percona XtraDB Cluster #####################################
# Plugins ####################################################
       InnoDB compression | ACTIVE
# Query cache ################################################
         query_cache_type | ON
                     Size | 32.0M
                    Usage | 2%
         HitToInsertRatio | 450%
# Schema #####################################################
Would you like to mysqldump -d the schema and analyze it? y/n n
Skipping schema analysis
# Noteworthy Technologies ####################################
                      SSL | No
     Explicit LOCK TABLES | No
           Delayed Insert | No
          XA Transactions | No
              NDB Cluster | No
      Prepared Statements | No
 Prepared statement count | 0
# InnoDB #####################################################
                  Version | 5.5.33
         Buffer Pool Size | 512.0M
         Buffer Pool Fill | 1%
        Buffer Pool Dirty | 0%
           File Per Table | ON
                Page Size | 16k
            Log File Size | 2 * 256.0M = 512.0M
          Log Buffer Size | 8M
             Flush Method |
      Flush Log At Commit | 1
               XA Support | ON
                Checksums | ON
              Doublewrite | ON
          R/W I/O Threads | 4 4
             I/O Capacity | 200
       Thread Concurrency | 0
      Concurrency Tickets | 500
       Commit Concurrency | 0
      Txn Isolation Level | REPEATABLE-READ
        Adaptive Flushing | ON
      Adaptive Checkpoint |
           Checkpoint Age | 0
             InnoDB Queue | 0 queries inside InnoDB, 0 queries in queue
       Oldest Transaction | 0 Seconds
         History List Len | 1478
               Read Views | 1
         Undo Log Entries | 0 transactions, 0 total undo, 0 max undo
        Pending I/O Reads | 0 buf pool reads, 0 normal AIO, 0 ibuf AIO, 0 preads
       Pending I/O Writes | 0 buf pool (0 LRU, 0 flush list, 0 page); 0 AIO, 0 sync, 0 log IO (0 log, 0 chkp); 0 pwrites
      Pending I/O Flushes | 0 buf pool, 0 log
       Transaction States | 1xnot started
# MyISAM #####################################################
                Key Cache | 128.0M
                 Pct Used | 20%
                Unflushed | 0%
# Security ###################################################
...
# The End ####################################################

Related branches

Revision history for this message
Miguel Angel Nieto (miguelangelnieto) wrote :

Confirmed in latest 2.2.5.

Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
Jaime Sicam (jssicam) wrote :

This is because pt-mysql-summary uses have_innodb variable to check if INNODB is available:

   section "InnoDB"
   local have_innodb="$(get_var "have_innodb" "$dir/mysql-variables")"
   if [ "${have_innodb}" = "YES" ]; then
      section_innodb "$dir/mysql-variables" "$dir/mysql-status"

      if [ -s "$dir/innodb-status" ]; then
         format_innodb_status "$dir/innodb-status"
      fi
   fi

But have_innodb has been removed since 5.6.1:
http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_have_innodb

Revision history for this message
Ovais Tariq (ovais-tariq) wrote :

Hi,

Can we get this fixed soon? It partly renders the tool useless on 5.6 servers, considering the usage of InnoDB over other storage engines.

tags: added: i40190
Revision history for this message
Mike Benshoof (mbenshoof) wrote :

Here is a quick fix that works well on both 5.6 as well as previous versions that use have_innodb:

2331c2331,2332
< if [ "${have_innodb}" = "YES" ]; then
---
> local innodb_ver="$(get_var "innodb_version" "$dir/mysql-variables")"
> if [[ "${have_innodb}" = "YES" || "${innodb_ver}" > "5.6.1" ]]; then

As was mentioned, with the increase in usage of 5.6 and the common use of InnoDB, this bug makes it tough to get a quick snapshot when first logging onto a server.

Changed in percona-toolkit:
assignee: nobody → Frank Cizmich (frank-cizmich)
importance: Undecided → High
status: Confirmed → Won't Fix
status: Won't Fix → Triaged
Revision history for this message
Frank Cizmich (frank-cizmich) wrote :

Here's a patch that does essentially what Mike posted.

Eventually the "proper" way would be to parse the output of the SHOW ENGINES query.

Changed in percona-toolkit:
milestone: none → 2.2.8
tags: added: pt-mysql-summary
Changed in percona-toolkit:
status: Triaged → In Progress
Changed in percona-toolkit:
status: In Progress → Fix Committed
summary: - pt-mysql-summary Blank InnoDB Section for 5.6
+ pt-mysql-summary blank InnoDB Section for 5.6
summary: - pt-mysql-summary blank InnoDB Section for 5.6
+ pt-mysql-summary blank InnoDB section for 5.6
Changed in percona-toolkit:
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-373

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.