Bug #9646 STATUS reports very high number of avg queries
Submitted: 5 Apr 2005 13:33 Modified: 5 Apr 2005 20:33
Reporter: Stefan Hinz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.3 OS:Linux (SuSE Linux 9.1 (Kernel 2.6.5))
Assigned to: Jani Tolonen CPU Architecture:Any

[5 Apr 2005 13:33] Stefan Hinz
Description:
STATUS returns "random" values for "Queries per second avg".  There doesn't seem to be a strict pattern, but issues STATUS several times will probably return values like these:
0.000
-0.000
+(very long integer)
-(very long integer)
Issue STATUS repeatedly, and the server will crash. (In my tests, I had to issue STATUS between 11 and 16 times to make it crash.)
Apparently, it doesn't matter which clients one uses to connect. I tested with a 4.1.6 client on Windows 2000 and a 5.0.3 client on Linux; same result.

How to repeat:
Connect to a 5.0.3 server and issue STATUS:
mysql> status
--------------
mysql  Ver 14.9 Distrib 5.0.3-beta, for pc-linux-gnu (i686)

Connection id:          1
Current database:
Current user:           stefan@localhost
SSL:                    Not in use
Current pager:          less
Using outfile:          ''
Using delimiter:        ;
Server version:         5.0.3-beta-standard
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:            /var/lib/mysql/mysql.sock
Uptime:                 2 min 41 sec

Threads: 1  Questions: 8  Slow queries: 0  Opens: 0  Flush tables: 0  Open tables: 1  Queries per second avg:
-1896609691927640254937704284676123402064407209578828560083051630989914537265270243356884944687655330929262939
05368498284289933303362369878394495578627850515000527388511030453406252832334524046790594022714594023190533814
7547440721598523789293629997251504894723832751849472.000
--------------

Suggested fix:
Return a more realistic value for "Queries per second avg". :-)
[5 Apr 2005 13:59] Hartmut Holzgraefe
verified with 5.0.3 release built from source (on SuSE 9.0),
does not happen with a bk build from Feb. 1st
[5 Apr 2005 20:12] 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/internals/23685
[5 Apr 2005 20:33] Jani Tolonen
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html