Bug #53498 Count queries by success/failure in SHOW STATUS

Submitted: 7 May 2010 16:12 Modified: 22 Feb 2011 18:31
Reporter: Mark Callaghan Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: General Severity:S4 (Feature request)
Version:5.1 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: error, queries, show, STATUS

[7 May 2010 16:12] Mark Callaghan
Description:
I want counts for all commands by success/failure. The counter names could be: Queries_ok, Queries_error. I think these can be incremented at the end of dispatch_command().

I also want a count for all commands incremented at command start (dispatch_command()). Both the Questions and Queries counters skip a few commands.

With the counters above I can monitoring command arrival and departure rates and can also find periods when error rates are increased.

I don't like that COM_STATISTICS and COM_PING are not counted today in the Questions/Queries counters. I know that they are counted elsewhere, but most people will miss that when debugging a hot server.

How to repeat:
na

Suggested fix:
Increment Queries_all at the start of dispatch_command().
Increment Queries_ok or Queries_error at the end of dispatch_command()
[7 May 2010 16:44] Valeriy Kravchuk
Thank you for the feature request.
[27 Jul 2010 15:33] James Young
Would like this prioritized for work in MySQL 5.6 if possible.
[22 Feb 2011 18:31] Mark Callaghan
I would also like to log a sample of all errors in a server-side log (general log, slow query log). It is easy to add errno attribute to slow query log. But the error text is also useful and that might require a new log file. For the Facebook patch I added an option to log a sample of all errors to slow query log, but this only gets the errno. The 5.5 audit plugin might make this possible.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.058 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.