Bug #54841 my.cnf entries cannot exceed 100 characters
Submitted: 27 Jun 2010 20:02 Modified: 30 Jun 2010 5:22
Reporter: FirstName LastName Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.1.45 OS:Any
Assigned to: CPU Architecture:Any
Tags: my.cnf install

[27 Jun 2010 20:02] FirstName LastName
Description:
The entries one creates in the my.cnf file cannot exceed 100 characters. One may enter an entry that is larger than than, but the tools that read my.cnf will only recognize up to 100 characters of it.

The problem is that when one tries to automate a large-scale build/install/test infrastructure it becomes impossible to test mysql on any path on the test machine.

This often results in building and testing under /tmp, which is not ideal.

How to repeat:
Create a my.cnf with an entry that defines the variables:

[mysqld]                                                                                                              
user=${DBMS_USER}                                                                                                           
basedir=${DBMS_INSTALL_PREFIX}                                                                                              
datadir=${DBMS_INSTALL_PREFIX}/data                                                                                         
port=${DBMS_PORT}                                                                                                           
socket=${DBMS_INSTALL_PREFIX}/var/run/mysql.sock                                                                            
pid-file=${DBMS_INSTALL_PREFIX}/var/run/mysqld.pid     

set DBMS_INSTALL_PREFIX to a large directory name.

Suggested fix:
Enlarge the character length of each line entry to be at least 1024 bytes. It doesn't hurt.
[28 Jun 2010 5:51] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior. Please send full error log file.
[28 Jun 2010 14:10] FirstName LastName
The output of running:

 ${DBMS_INSTALL_PREFIX}/bin/mysqld_safe --defaults-file=${DBMS_INSTALL_PREFIX}/etc/my.cnf &

is:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/home/123456789/devel/123456789/trunk/system/src/tests/build/installation/mysql-5.1.45-source/var/ru' (2)

No log file is generated. I wonder if that's because log file name is also over 100 characters:

[mysqld_safe]                                                                                                               
log-error=${DBMS_INSTALL_PREFIX}/var/log/mysqld.log
[29 Jun 2010 7:54] Sveta Smirnova
Thank you for the feedback.

I still can not repeat described behavior: server is up and running. Please run `ps -ef | grep mysqld` command and provide us its output.
[29 Jun 2010 15:51] FirstName LastName
Sveta changed the Version in the issue-tracker to include "5.1.49-bzr".

That is NOT the version I am using. I am using 5.1.45. So I am removing the Version change.

Here's what is shown in the log file:

100629 15:49:41 [ERROR] The socket file path is too long (> 107): /home/chronicdb/devel/ChronicDB/trunk/system/src/tests/build/installation/mysql-5.1.45-source/var/run/mysql.sock

The mysql server does not even start:

$ ps -ef | grep -i mysql
1000      5613 11657  0 Jun27 pts/0    00:00:22 emacs -nw ../build/source/mysql-5.1.45-source_source_build_log.txt
1000      7960 13805  0 15:50 pts/7    00:00:00 grep -i mysql
1000      9462 11657  0 Jun27 pts/0    00:00:00 emacs -nw tests_prepare_mysql/results/product-tests_prepare_mysql.log
1000     20146 11657  0 15:35 pts/0    00:00:00 emacs -nw ../tests/build/source/mysql-5.1.45-source_source_build_log.txt
[29 Jun 2010 15:55] FirstName LastName
$ grep -irnH "the socket file path is too long" *

sql/mysqld.cc:1752:      sql_print_error("The socket file path is too long (> %u): %s",

which is:

sql_print_error("The socket file path is too long (> %u): %s",
                      (uint) sizeof(UNIXaddr.sun_path) - 1, mysqld_unix_port);
[29 Jun 2010 15:58] FirstName LastName
Which seems to use:

#ifdef HAVE_SYS_UN_H
  struct sockaddr_un    UNIXaddr;
#endif
[30 Jun 2010 5:22] Sveta Smirnova
Thank you for the feedback.

This is OS limitation and not MySQL bug. See comment "[3 Feb 2009 8:11] Daniel Fischer" to bug #42512 for more details.