slow_query_log_file without "=" sign enables the general query log
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Won't Fix
|
Low
|
Unassigned | |||
5.5 |
Triaged
|
Low
|
Unassigned | |||
5.6 |
Triaged
|
Low
|
Unassigned | |||
5.7 |
Fix Released
|
Low
|
Unassigned |
Bug Description
[In:Percona Server Documentation]
I was working on a server that had the slow query log enabled over the weekend. Upon investigation it looks like the general query log gets enabled also during this process. If you simply set the slow_query_log* variables in /etc/my.cnf with no mention of the general_log it will enable the general log.
[root@server ~]# mysql -e "show variables like '%general_log%';"
+--
| Variable_name | Value |
+--
| general_log | OFF |
| general_log_file | /var/lib/
+--
[root@server ~]# vim /etc/my.cnf
[root@server ~]# /etc/init.d/mysql restart
Shutting down MySQL (Percona Server).. [ OK ]
Starting MySQL (Percona Server).. [ OK ]
[root@server ~]# mysql -e "show variables like '%general_log%';"
+--
| Variable_name | Value |
+--
| general_log | ON |
| general_log_file | /var/lib/
+--
/etc/my.cnf values inserted:
slow_query_log = 1
slow_
If I set "general_log = 0" ABOVE the slow_query_log values it is ignored and the general query log is still enabled. As long as it is set after the slow_query_log* variables it is disabled as expected.
Not sure if this is expected behavior to enable the general query log automatically when enabling the slow query log as it can cause a lot of extra overhead with disk writes on a busy server.
Changed in percona-server: | |
importance: | Undecided → Critical |
importance: | Critical → Low |
status: | Confirmed → Triaged |
tags: | added: slow-extended |
tags: | added: upstream |
Hi,
I've been able to reproduce the problem. These are your two variables:
slow_query_log = 1 log_file /var/lib/ mysql/slow. log
slow_query_
See that the second variable doesn't have '=' sign. So there is the bug, slow_query_log_file without '=' enables the general query log. If you add the '=' symbol and restart mysql the general query log won't be enabled.
Thanks for your report.