Bug #40395 mysqladmin -i delay extended-status does not iterate with -r
Submitted: 29 Oct 2008 16:07 Modified: 7 Aug 2009 20:47
Reporter: Rene' Cannao' Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients 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 CPU Architecture:Any
Tags: mysqladmin

[29 Oct 2008 16: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 18: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 10:14] Rene' Cannao'
The MySQL version I tried is mysql-5.1.29-rc-linux-i686-glibc23.tar.gz
[3 Nov 2008 10: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 10:24] Sveta Smirnova
Workaround: use self-compiled version
[9 Jan 2009 12:52] Oli Sennhauser
It must be broken between 5.1.26 and 5.1.28 (first work later not anymore)
[12 May 2009 8:48] Sveta Smirnova
Bug #44790 was marked as duplicate of this one.
[12 May 2009 8:55] Tonci Grgin
Sorry Jorro, a mistake.
[13 May 2009 12:40] Nick Loeve
Confirmed on 5.1.34 also, source release
[18 May 2009 15: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 2009 19: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 2009 19: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 2009 19: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 2009 20:01] Rene' Cannao'
Verified also on mysql-5.4.0-beta-linux-x86_64-glibc23.tar.gz

64 bit.
[18 May 2009 21: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
[14 Jul 2009 17:23] Jim Winstead
Pushed to 5.1-bugteam and mysql-pe.
[4 Aug 2009 19:51] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090804194615-h40sa098mx4z49qg) (version source revid:jimw@mysql.com-20090714171651-ziq080rkon3u244l) (merge vers: 5.4.4-alpha) (pib:11)
[4 Aug 2009 20:45] Bugs System
Pushed into 5.1.38 (revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (version source revid:davi.arnaut@sun.com-20090804204317-ggodqkik7de6nfpz) (merge vers: 5.1.38) (pib:11)
[7 Aug 2009 20:47] Paul DuBois
Noted in 5.1.38, 5.4.4 changelogs.

mysqladmin did not have enough space allocated for tracking all
variables when using --vertical or --relative with extended-status.
[12 Aug 2009 22:49] Paul DuBois
Noted in 5.4.2 changelog because next 5.4 version will be 5.4.2 and not 5.4.4.
[15 Aug 2009 2:04] Paul DuBois
Ignore previous comment about 5.4.2.
[1 Oct 2009 5:58] Bugs System
Pushed into 5.1.39-ndb-6.3.28 (revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (version source revid:jonas@mysql.com-20091001055605-ap2kiaarr7p40mmv) (merge vers: 5.1.39-ndb-6.3.28) (pib:11)
[1 Oct 2009 7:25] Bugs System
Pushed into 5.1.39-ndb-7.0.9 (revid:jonas@mysql.com-20091001072547-kv17uu06hfjhgjay) (version source revid:jonas@mysql.com-20091001071652-irejtnumzbpsbgk2) (merge vers: 5.1.39-ndb-7.0.9) (pib:11)
[1 Oct 2009 13:25] Bugs System
Pushed into 5.1.39-ndb-7.1.0 (revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (version source revid:jonas@mysql.com-20091001123013-g9ob2tsyctpw6zs0) (merge vers: 5.1.39-ndb-7.1.0) (pib:11)
[5 Oct 2009 10:50] Bugs System
Pushed into 5.1.39-ndb-6.2.19 (revid:jonas@mysql.com-20091005103850-dwij2dojwpvf5hi6) (version source revid:jonas@mysql.com-20090930185117-bhud4ek1y0hsj1nv) (merge vers: 5.1.39-ndb-6.2.19) (pib:11)
[8 Oct 2009 19:39] Paul DuBois
The 5.4 fix has been pushed to 5.4.2.