This patch adds a configurable variable that causes slow query logging to use the global value for long_query_time, instead of the local value each thread sees.
Without this patch, a long-lived connection to MySQL will not normally see changes to the global long_query_time variable, so in many cases it's not possible to configure the logging time without restarting the application or the server. With the patch, it is quick and easy to change the logging behavior across all threads with no interruption to service.
This patch is included as part of slow_extended.
The patch is first available in the Percona 5.0.77 build 13 and Percona 5.0.75 build 13.
The patch provides the following variables:
| Type | System and command-line variable |
| Scope | Global |
| Dynamic | Yes |
| Default | 0 |
Whether threads should use the global value of long_query_time. The default value of 0 provides the same behavior as an unpatched MySQL server: a connection inherits its value of long_query_time from the global value when it is created, and does not refer to it afterwards. When the variable is set to 1, threads use the global value, and the local value is updated when the global value is changed.
| Author/Origin | Percona |
| Bugs fixed | |
| Dependencies | slow_extended |
Please report bugs to https://bugs.launchpad.net/percona-project/+filebug and ask general questions in maillist Percona-discussions
Discussion