Bug #72659 --no-headers option doesn't work with --format=vertical with mysqlserverinfo
Submitted: 15 May 2014 13:51 Modified: 12 Jun 2014 2:46
Reporter: Shahriyar Rzayev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Utilities Severity:S1 (Critical)
Version:1.4.2 OS:Linux (CentOS 6.5)
Assigned to: CPU Architecture:Any

[15 May 2014 13:51] Shahriyar Rzayev
Description:
As --help option states:

-h, --no-headers      do not show column headers -> it will not show column headers when used.

it is true for --format=grid, csv and tab but not true for vertical:

With grid:

[root@linuxsrv3 ~]# mysqlserverinfo --server=root:12345@localhost --format=grid -vvv -h
# Source on localhost: ... connected.
+-----------------+--------------+-------------------+-----------------+------------+----------------+-------------+------------------+----------+---------------------------+--------------+-------------------+------------------------+-------------------------------+----------------------+-----------------+-------------------------------------+---------------------------+
| localhost:3306  | /etc/my.cnf  | mysql-bin.000019  | 191             |            |                | 5.6.17-log  | /var/lib/mysql/  | /usr     | /usr/lib64/mysql/plugin/  | OFF          |                   |                        | /var/lib/mysql/linuxsrv3.err  | 87559 bytes          | ON              | /var/lib/mysql/data/mysql-slow.log  | 1935736570 bytes          |
+-----------------+--------------+-------------------+-----------------+------------+----------------+-------------+------------------+----------+---------------------------+--------------+-------------------+------------------------+-------------------------------+----------------------+-----------------+-------------------------------------+---------------------------+
#...done.

With csv:

[root@linuxsrv3 ~]# mysqlserverinfo --server=root:12345@localhost --format=csv -vvv -h
# Source on localhost: ... connected.
localhost:3306,/etc/my.cnf,mysql-bin.000019,191,,,5.6.17-log,/var/lib/mysql/,/usr,/usr/lib64/mysql/plugin/,OFF,,,/var/lib/mysql/linuxsrv3.err,87559 bytes,ON,/var/lib/mysql/data/mysql-slow.log,1935736570 bytes
#...done.

With tab:

[root@linuxsrv3 ~]# mysqlserverinfo --server=root:12345@localhost --format=tab -vvv -h
# Source on localhost: ... connected.
localhost:3306	/etc/my.cnf	mysql-bin.000019	191		5.6.17-log	/var/lib/mysql/	/usr	/usr/lib64/mysql/plugin/	OFF			/var/lib/mysql/linuxsrv3.err	87559 bytes	ON	/var/lib/mysql/data/mysql-slow.log	1935736570 bytes
#...done.

With vertical:

[root@linuxsrv3 ~]# mysqlserverinfo --server=root:12345@localhost --format=vertical -vvv -h
# Source on localhost: ... connected.
*************************       1. row *************************
                   server: localhost:3306
              config_file: /etc/my.cnf
               binary_log: mysql-bin.000019
           binary_log_pos: 191
                relay_log: 
            relay_log_pos: 
                  version: 5.6.17-log
                  datadir: /var/lib/mysql/
                  basedir: /usr
               plugin_dir: /usr/lib64/mysql/plugin/
              general_log: OFF
         general_log_file: 
    general_log_file_size: 
                log_error: /var/lib/mysql/linuxsrv3.err
      log_error_file_size: 87559 bytes
           slow_query_log: ON
      slow_query_log_file: /var/lib/mysql/data/mysql-slow.log
 slow_query_log_file_size: 1935736570 bytes
1 row.
#...done.

How to repeat:
As stated in description.

Suggested fix:
Also do not show headers with --format=vertical option
[19 May 2014 10:04] MySQL Verification Team
Hello Shahriyar,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[12 Jun 2014 2:46] Philip Olson
Fixed as of the upcoming MySQL Utilities 1.4.4 release, and here's the changelog entry:

Descriptive text for the "--no-headers" option was improved to clearly
indicate which formats it supports. For example, it does not support the
"vertical" format.

Thank you for the bug report.