Bug #40395 mysqladmin -i delay extended-status does not iterate with -r
Submitted: 29 Oct 2008 17:07 Modified: 21 May 17:21
Reporter: Rene' Cannao'
Status: Patch approved
Category:Client Severity:S3 (Non-critical)
Version:5.1.29-rc-log 5.4.0-beta-log, 5.1-bzr OS:Any (Linux, Mac OSX, 32-bit only)
Assigned to: Jim Winstead Target Version:5.1+
Tags: mysqladmin
Triage: Triaged: D3 (Medium)

[29 Oct 2008 17:07] Rene' Cannao'
Description:
mysqladmin does not iterate if -r is used in combination with -i

How to repeat:
The follows works correctly, doing an iteration every 10 seconds.
shell> mysqladmin -i 10 extended-status

The follows shows only one result, without doing any iteration.
shell> mysqladmin -i 10 -r extended-status

Suggested fix:
Honor the --relative/-r option
[1 Nov 2008 19:48] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior. Please indicate accurate version of MySQL you use.

Probably this is same problem like in bug #37751
[3 Nov 2008 11:14] Rene' Cannao'
The MySQL version I tried is mysql-5.1.29-rc-linux-i686-glibc23.tar.gz
[3 Nov 2008 11:23] Sveta Smirnova
Thank you for the feedback.

Verified as described with mysql-5.1.29-rc-linux-i686-glibc23.tar.gz
[3 Nov 2008 11:24] Sveta Smirnova
Workaround: use self-compiled version
[9 Jan 13:52] Oli Sennhauser
It must be broken between 5.1.26 and 5.1.28 (first work later not anymore)
[12 May 10:48] Sveta Smirnova
Bug #44790 was marked as duplicate of this one.
[12 May 10:55] Tonci Grgin
Sorry Jorro, a mistake.
[13 May 14:40] Nick Loeve
Confirmed on 5.1.34 also, source release
[18 May 17:00] Georgi Kodinov
Thank you for taking the time to report a problem.  Unfortunately you are not using a
current version of the product you reported a problem with -- the problem might already be
fixed. Please download a new version from http://www.mysql.com/downloads/

If you are able to reproduce the bug with one of the latest versions, please change the
version on this bug report to the version you tested and change the status back to "Open".
 Again, thank you for your continued support of MySQL.

I've tried with both the latest 5.1-bk version and the 5.1.34-linux-x86_64 community
version (.tar.gz) and they were both bahving as expected with "-i 10 -r extended-status"
[18 May 21:54] Sveta Smirnova
Georgi,

duplicate bug #44790 was verified using version 5.1.34. Also this is 32-bit issue, so it
is expected you can not repeat error with 64-bit binaries.
[18 May 21:58] Sveta Smirnova
Output in my env:

$mysqladmin51 -i 10 -r extended-status
+-----------------------------------+----------+
| Variable_name                     | Value    |
+-----------------------------------+----------+
| Aborted_clients                   | 0        |
| Aborted_connects                  | 360      |
| Binlog_cache_disk_use             | 0        |
...
| Uptime                            | -711169274805027|
| Uptime_since_flush_status         | -143585  |
+-----------------------------------+----------+

/Users/apple/Applications/mysql-5.1/bin/mysqladmin: Unknown command: 'extended-status'

$mysqladmin51 -i 10 extended-status
+-----------------------------------+----------+
| Variable_name                     | Value    |
+-----------------------------------+----------+
| Aborted_clients                   | 0        |
| Aborted_connects                  | 362      |
| Binlog_cache_disk_use             | 0        |
...
| Uptime                            | 22049    |
| Uptime_since_flush_status         | 22049    |
+-----------------------------------+----------+

+-----------------------------------+----------+
| Variable_name                     | Value    |
+-----------------------------------+----------+
| Aborted_clients                   | 0        |
| Aborted_connects                  | 363      |
| Binlog_cache_disk_use             | 0        |
...
[18 May 21:58] Sveta Smirnova
$mysqladmin51 --version
/Users/apple/Applications/mysql-5.1/bin/mysqladmin  Ver 8.42 Distrib 5.1.36, for
apple-darwin8.11.1 on i386
[18 May 22:01] Rene' Cannao'
Verified also on mysql-5.4.0-beta-linux-x86_64-glibc23.tar.gz

64 bit.
[18 May 23:21] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/74429

2899 Jim Winstead	2009-05-18
      mysqladmin did not have enough space allocated for tracking all variables
      when using --vertical or --relative with extended-status. (Bug #40395)
      
        This patch simply increases the buffer size and adds an assert to
        check that it is big enough -- a more comprehensive fix would dynamically
        allocate the appropriate buffers.
      modified:
        client/mysqladmin.cc