Write rate limit value into slow log

Registered by Vadim Tkachenko

TODO: add an example

If log_slow_rate_limit is effective, I would like it is reflected in slow-log for each written query.
It should be written together with log_slow_rate_type

That for in slow log for query we add a section:
# log_slow_rate_type: (session|query) log_slow_rate_limit:1000

Beside that, I would like to add a global variable:
 slow_query_log_always_write_time = N (default: 10 )

This should work in following way:

If log_slow_rate_limit is in effect and query is not going to be written in slow-log
because query is filtered out by rate : we need to check query_time of this query.
and if query_time >= slow_query_log_always_write_time, then we write this query anyway.

Blueprint information

Status:
Complete
Approver:
Vadim Tkachenko
Priority:
High
Drafter:
None
Direction:
Approved
Assignee:
Sergei Glushchenko
Definition:
Approved
Series goal:
Accepted for 5.5
Implementation:
Implemented
Milestone target:
milestone icon 5.5.34-32.0
Started by
Alexey Kopytov
Completed by
Laurynas Biveinis

Whiteboard

Should it apply only to file handler, or for other handlers as well?

Vadim: do other handlers support Percona Server slow-log extensions?

I propose to rename slow_query_log_always_write_time to log_slow_always_write_time because many variables of group named log_slow_*.

Vadim: No, we actually rename many variables to start with slow_query_log* http://www.percona.com/doc/percona-server/5.5/diagnostics/slow_extended_55.html

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.