Details
Description
Switched to MariaDB 5.5.29 from Percona SQL Server 5.1a and noticed empty slow query log.
It looks like it is logging only when log_slow_filter is set, but it is not logging when log_slow_filter is set empty string.
Having filter set is not resolving the issue, since optimized, but still slow queries are not logged.
log_slow_filter = 'admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk'
Test case:
SET long_query_time=1; SET log_slow_filter=''; SET GLOBAL slow_query_log=1; SET GLOBAL log_output='TABLE'; SELECT SLEEP(2); SELECT * FROM mysql.slow_log;
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
I didn't get the part about "Having filter set is not resolving the issue, since optimized, but still slow queries are not logged", but I agree with the point about log_slow_filter being an empty string. The parameter description in Percona says:
"If the string is empty, then the filter is disabled"
http://www.percona.com/doc/percona-server/5.1/diagnostics/slow_extended.html?id=percona-server:features:slow_extended_51&redirect=2
In Percona server it is indeed so, but in MariaDB, if the parameter is empty, no slow logging is performed – see the test case added to the description.
To make SELECT SLEEP appear in the slow log, log_slow_filter has to be set to something containing 'query_cache_miss'.