[debian-mysql] Bug#637102: mysql-common: my.cnf byte sizes are inadequately parsed

Stefan Froehlich debian at froehlich.priv.at
Mon Aug 8 13:48:03 UTC 2011


Package: mysql-common
Version: 5.1.49-3
Severity: minor


mysql-5.1-5.1.49/sql-common/client.c contains (amongst others):

|        case 27:
|          if (opt_arg)
|            options->max_allowed_packet= atoi(opt_arg);
|          break;

This allows max_allow_packet to be specified as found in the attached file,
but ONLY as a plain integer and NOT in the common notation eg. "100M" used
elsewhere in my.cnf (which is parsed via mysys/my_getopt.c).

This difference in parsing can create quite an amount of confusion and
should therefore clearly be stated (at least) in the configuration
template.

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

Kernel: Linux 2.6.28.7 (SMP w/2 CPU cores)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- Configuration Files:
/etc/mysql/my.cnf changed:
[client]
port		= 3306
socket		= /var/run/mysqld/mysqld.sock
max_allowed_packet	= 104857600
[mysqld_safe]
socket		= /var/run/mysqld/mysqld.sock
nice		= 0
[mysqld]
user		= mysql
pid-file	= /var/run/mysqld/mysqld.pid
socket		= /var/run/mysqld/mysqld.sock
port		= 3306
basedir		= /usr
datadir		= /var/lib/mysql
tmpdir		= /tmp
language	= /usr/share/mysql/english
skip-external-locking
bind-address		= 0.0.0.0
key_buffer		= 16M
max_allowed_packet	= 1024M
thread_stack		= 192K
thread_cache_size	= 8
myisam-recover		= BACKUP
query_cache_limit       = 1M
query_cache_size        = 16M
general_log_file        = /var/log/mysql/mysql.log
general_log             = 0
log-error		= /var/log/mysql/mysql.err
slow_query_log	= /var/log/mysql/mysql-slow.log
long_query_time = 2
expire_logs_days	= 10
max_binlog_size         = 2G
innodb_file_per_table
ft_min_word_len=2
[myisamchk]
ft_min_word_len=2
[mysqldump]
quick
quote-names
max_allowed_packet	= 1024M
[mysql]
[isamchk]
key_buffer		= 16M
!includedir /etc/mysql/conf.d/


-- no debconf information





More information about the pkg-mysql-maint mailing list