log_slow_statement called unconditionally
Bug #1160436 reported by
Raghavendra D Prabhu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Won't Fix
|
Medium
|
Unassigned | |||
5.5 |
Triaged
|
Medium
|
Unassigned | |||
5.6 |
Triaged
|
Medium
|
Unassigned | |||
5.7 |
Triaged
|
Medium
|
Unassigned |
Bug Description
log_slow_
if (!res && unlikely(
Ideally, if opt_slow_log is set to 0, this function shouldn't be
called at all. (There should be no need to set long_query_time to
be set to 0 or other things).
This was noticed when, on an instance, where slow_query_log was
set to 0, the status variable Slow_queries was jumping quite
rapidly (I also noticed that in init_slave_thread
thd->enable_
To post a comment you must log in.
Raghu -
Please read the source of log_slow_ statement( ). It is not an issue that the function itself is called, because it is there where the decision to slow-log or not a given query is made, it just quits early if needed.
The status variable Slow_queries jumping rapidly is another issue that should be investigated. It is only bumped in log_slow_ statement( ) right before slow_log_print() call.
thd->enable_ slow_log = TRUE in init_slave_thread is benign.