[MDEV-21187] log_query_not_using_indexes=OFF does not work when log_slow_filter is empty string Created: 2019-12-02 Updated: 2022-12-13 Resolved: 2022-12-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.3.20, 10.3, 10.4 |
| Fix Version/s: | 10.11.2, 10.3.38, 10.4.28, 10.5.19, 10.6.12, 10.7.8, 10.8.7, 10.9.5, 10.10.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Shuode Li | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
All platform |
||
| Description |
|
When set it on my.cnf Run query
Then the query not using indexes will be logged into slow log. The is a wrong behavior due to document and is different from previous version like 10.2. Analysis On file sql_parse.cc
The slow_filter_masked is
Which means the function return false when `log_slow_filter` is 0, which is set when in config it is a empty string. And then log_queries_not_using_indexes=OFF does not work and always log the not using indexes queries. |
| Comments |
| Comment by Alice Sherepa [ 2019-12-02 ] |
|
Thanks! I reproduced as described on current 10.3, 10.4 |
| Comment by Michael Widenius [ 2022-12-13 ] |
|
At some point we should change so that log_slow_filter="" would be same as log_slow_filter="all_type_of_queries" |
| Comment by Michael Widenius [ 2022-12-13 ] |
|
Requested a simple change in submitted patch. |