slow_query_log missing queries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Incomplete
|
Undecided
|
Muhammad Irfan |
Bug Description
Trying to get ALL queries in a small period logged, general log does not have enough info
So using
SET GLOBAL log_output='TABLE';
SET GLOBAL slow_query_log=0;
SET GLOBAL general_log=0;
TRUNCATE TABLE mysql.slow_log;
TRUNCATE TABLE mysql.general_log;
SET GLOBAL long_query_time=0;
SET GLOBAL slow_query_log=1;
SET GLOBAL general_log=1;
SELECT SLEEP(120);
SET GLOBAL slow_query_log=0;
SET GLOBAL general_log=0;
Then using
SELECT (
SELECT COUNT(*) FROM slow_log WHERE lcase(sql_text) LIKE '%update%'
) slow,
(
SELECT COUNT(*) FROM general_log WHERE lcase(argument) LIKE '%update%'
) general;
You get different results, the slow log has alot less queries in than the general log even if you limit the query times to exclude the beginning and end of the period
Changed in percona-server: | |
assignee: | nobody → Muhammad Irfan (muhammad-irfan) |
mysql> SELECT VERSION();
+-----------------+
| VERSION() |
+-----------------+
| 5.6.32-78.0-log |
+-----------------+
1 row in set (0.00 sec)