Bug #24991 'status' in MySQL client outputs 'Queries per second avg: %'
Submitted: 12 Dec 2006 2:50 Modified: 13 Apr 2007 23:20
Reporter: Markus Popp Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.1.14 OS:Linux (Linux, Windows, ...?)
Assigned to: Assigned Account CPU Architecture:Any

[12 Dec 2006 2:50] Markus Popp
Description:
The MySQL Monitor command 'status' outputs 'Queries per second avg: %', always returning a percent sign instead of the value.

How to repeat:
mpopp@falcon:~> mysql
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 974
Server version: 5.1.14-beta-log MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> status
--------------
mysql  Ver 14.13 Distrib 5.1.14-beta, for unknown-linux-gnu (x86_64) using readline 5.0

Connection id:          974
Current database:
Current user:           mpopp@localhost
SSL:                    Not in use
Current pager:          less
Using outfile:          ''
Using delimiter:        ;
Server version:         5.1.14-beta-log MySQL Community Server (GPL)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    utf8
Db     characterset:    utf8
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /tmp/mysql.sock
Uptime:                 7 hours 31 min 42 sec

Threads: 6  Questions: 3250  Slow queries: 0  Opens: 41  Flush tables: 1  Open tables: 31  Queries per second avg: %
--------------
[9 Jan 2007 17:01] 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/17792

ChangeSet@1.2348, 2007-01-09 18:58:34+02:00, jani@ua141d10.elisa.omakaista.fi +1 -0
  Fix for Bug#24991, "'status' in MySQL client outputs 'Queries per second avg: %'"
  
  my_snprintf() doesn't have %f, so we need to calculate integer
  and decimal parts separately.
[13 Apr 2007 23:20] Sergei Golubchik
Don't push please. It's a duplicate of Bug#25615 (which was submitted later, but nobody noticed it was a duplicate) for which we have a contributed patch that adds support for %f to my_vsnprintf().