[debian-mysql] Bug#633773: mysql-server: my.cnf uses deprecated options for slow query logging

Wolfgang Schulze-Zachau wszachau at aminocom.com
Wed Jul 13 14:42:03 UTC 2011


Package: mysql-server
Version: 5.1.49-3
Severity: normal


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
#log-queries-not-using-indexes
#

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
log-queries-not-using-indexes

-- System Information:
Debian Release: 6.0.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686-bigmem (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages mysql-server depends on:
ii  mysql-server-5.1              5.1.49-3   MySQL database server binaries and

mysql-server recommends no packages.

mysql-server suggests no packages.

-- no debconf information





More information about the pkg-mysql-maint mailing list