Bug #30000 SHOW commands once again ends up in the slow query log
Submitted: 24 Jul 2007 8:11 Modified: 3 Aug 2007 2:23
Reporter: Tobias Asplund Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:5.1.20 OS:Linux
Assigned to: Georgi Kodinov CPU Architecture:Any
Tags: regression

[24 Jul 2007 8:11] Tobias Asplund
Description:
The fix for http://bugs.mysql.com/bug.php?id=19764 seems to have been reverted or something undid it in the later versions.

[mysql@hitomi logs]$ cat slow_query.log 

[mysql@hitomi logs]$ mysql -e "show tables" mysql > /dev/null 
[mysql@hitomi logs]$ cat slow_query.log 

# Time: 070724 16:38:59
# User@Host: root[root] @ localhost []
# Query_time: 0  Lock_time: 0 Rows_sent: 23  Rows_examined: 23
use mysql;
SET timestamp=1185262739;
show tables;

How to repeat:
run a show command with --log-slow-queries and --log-queries-not-using-indexes enabled on the server, check the slow query log.
[24 Jul 2007 11:45] Miguel Solorzano
Thank you for the bug report. I wasn't able to repeat with server built
with latest source (last night pull):

[miguel@skybr 5.1]$ bin/mysql -uroot -e "show tables" mysql > /dev/null 
[miguel@skybr 5.1]$ cat var/skybr-slow.log 
libexec/mysqld, Version: 5.1.21-beta-debug-log (Source distribution). started with:
Tcp port: 0  Unix socket: (null)
Time                 Id Command    Argument
[miguel@skybr 5.1]$
[24 Jul 2007 11:52] Sveta Smirnova
test case

Attachment: bug30000.test (application/octet-stream, text), 116 bytes.

[24 Jul 2007 11:52] Sveta Smirnova
options

Attachment: bug30000-master.opt (application/octet-stream, text), 79 bytes.

[24 Jul 2007 11:53] Sveta Smirnova
I can repeat described behaviour on Linux using attached test case. So chenaged status to verified.
[24 Jul 2007 11:54] Sveta Smirnova
Bug exists since version 5.1.17
[25 Jul 2007 13:57] 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/31544

ChangeSet@1.2556, 2007-07-25 16:56:49+03:00, gkodinov@magare.gmz +3 -0
  Bug #30000: SHOW commands once again ends up in the slow query log
  
  All SHOW commands must not enter the slow query log.
  
  Extended the 5.1 fix for bug 19764 to cover all the SHOW commands
  (instead of only SHOW STATUS). This makes it compatible with the
  5.0 behavior.
[27 Jul 2007 13:18] 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/31700

ChangeSet@1.2562, 2007-07-27 16:17:47+03:00, gkodinov@magare.gmz +3 -0
  Bug #30000: SHOW commands once again ends up in the 
   slow query log
  Disable the SHOW commands to appear in the show query
  log.
  Update the commands type array.
[2 Aug 2007 19:12] Bugs System
Pushed into 5.1.21-beta
[3 Aug 2007 2:23] Paul Dubois
Noted in 5.1.21 changelog.

SHOW statements were being written to the slow query log that should
not have been.