gplessis/dotdeb-mysql-5.5 — Issue #1: my.cnf uses deprecated options for slow query logging
Author: gplessis
Created: 2012-02-12 06:30:55+00:00
State: open
Labels: change

The default my.cnf file for this version uses options that are deprecated as per V5.1.29.

Extract from my.cnf:

# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2

As per manual, `log_slow_queries` is deprecated, and as of 5.1.29 the options `slow_query_log`
and `slow_query_log_file` must be used.

The real issue is that if a user enables the options in my.cnf, the server will log *ALL*
queries into the slow log file, and completely disregard the `long_query_time value`. This leads
to a performance drag and excessive log files. Only when the correct options are used and the
server is restarted, will the proper slow log be performed.

A corrected version of the above section looks like this (options enabled):

slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log
long_query_time = 1

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=633773 for more info