Bug #63184 | Query on mysql.slow_log using WHERE returns strange results | ||
---|---|---|---|
Submitted: | 10 Nov 2011 12:39 | Modified: | 2 Oct 2012 20:29 |
Reporter: | Daniël van Eeden | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
Version: | 5.5.16 | OS: | Windows (Windows 7) |
Assigned to: | CPU Architecture: | Any |
[10 Nov 2011 12:39]
Daniël van Eeden
[10 Nov 2011 13:40]
Peter Laursen
Is "\r" supposed to be 'newlines'? I think that the log tables and MySQL CSV tables in general use "\n" (Linux type linebreads) on all platforms? Peter (not a MySQL person - and forgive me if it is a stupid and misunderstood remark)
[10 Nov 2011 20:46]
MySQL Verification Team
Can you verify the table structures are correct? For 5.5.16 it should look like: mysql> show create table slow_log\G *************************** 1. row *************************** Table: slow_log Create Table: CREATE TABLE `slow_log` ( `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `user_host` mediumtext NOT NULL, `query_time` time NOT NULL, `lock_time` time NOT NULL, `rows_sent` int(11) NOT NULL, `rows_examined` int(11) NOT NULL, `db` varchar(512) NOT NULL, `last_insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL, `sql_text` mediumtext NOT NULL ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'; As a test, please try isolate the problem more. Remove the ORDER BY and/or the LIMIT as a start. Does a plain SELECT * FROM slow_log produce good results? If the problem is only happening with ORDER BY, try a tiny or large sort_buffer_size to see if it helps...
[15 Nov 2011 8:11]
Daniël van Eeden
Here is the table structure (copy-paste from MySQL Workbench) CREATE TABLE `slow_log` ( `start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `user_host` mediumtext NOT NULL, `query_time` time NOT NULL, `lock_time` time NOT NULL, `rows_sent` int(11) NOT NULL, `rows_examined` int(11) NOT NULL, `db` varchar(512) NOT NULL, `last_insert_id` int(11) NOT NULL, `insert_id` int(11) NOT NULL, `server_id` int(10) unsigned NOT NULL, `sql_text` mediumtext NOT NULL ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
[15 Nov 2011 8:23]
Daniël van Eeden
Screenshot of WB and cmd clients
Attachment: slow_log_bug.png (image/png, text), 238.34 KiB.
[14 Jan 2012 11:31]
Sveta Smirnova
Thank you for the report. I can not repeat described behavior. Please try with current version 5.5.20 and inform us if problem still exists.
[30 Jan 2012 20:37]
Daniël van Eeden
Sorry as I don't have access to a Windows 7 system it's not possible for me to test this now.
[2 Oct 2012 20:29]
MySQL Verification Team
Please reopen this bug report when you are able to repeat with the last released version. Thanks.