[MDEV-4206] slow query log is not logging when log_slow_filter is empty Created: 2013-02-26 Updated: 2022-12-13 Resolved: 2013-05-08 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.1, 5.5.29 |
| Fix Version/s: | 10.0.3, 5.5.31 |
| Type: | Bug | Priority: | Major |
| Reporter: | Sergiy Tytarenko | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| 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:
|
| Comments |
| Comment by Elena Stepanova [ 2013-02-26 ] |
|
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: 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. |
| Comment by Elena Stepanova [ 2013-02-26 ] |
|
Not reproducible on maria/5.3. |
| Comment by Sergiy Tytarenko [ 2013-02-26 ] |
|
From MariaDB documentation: "Multiple options are separated by ','. If you don't specify any options (default) everything will be logged." Once we switched to mariadb, log_slow_filter was set to be empty (to log all slow queries), but we noticed no queries in slow log. https://kb.askmonty.org/en/slow-query-log-extended-statistics/ log_slow_filter You can define which queries to log to the slow query log by setting the variable log_slow_filter to a combination of the following values: admin |
| Comment by Dmitry Kuryata [ 2013-02-26 ] |
|
Looks like documentation has been adjusted Still, this sentence doesn't seem to be correct |
| Comment by Elena Stepanova [ 2013-05-23 ] |
|
The problem with the empty value is fixed in 5.5.31. The default value in 5.5 remains the full list of values, so I updated the text in the following way: was: now: The text quoted in the previous comment ("The default value is ' ', to be compatible with MySQL 5.1") relates to log_slow_verbosity (not to log_slow_filter) and remains true. |