Bug #50021 Windows standard configuration files are showing Linux options/settings
Submitted: 1 Jan 2010 22:57 Modified: 14 Dec 2010 20:19
Reporter: Roel Van de Paar Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S2 (Serious)
Version:5.1, 5.5 OS:Windows
Assigned to: Georgi Kodinov CPU Architecture:Any

[1 Jan 2010 22:57] Roel Van de Paar
Description:
1. Windows standard configuration files are showing Linux options/settings like:
socket = /tmp/mysql.sock

2. There are path errors in the suggested values (notice '/'): #innodb_data_home_dir = C:\mysql\data/

3. Though the example configuration filenames are listed as '.ini', the file itself contains remarks about '.cnf' like:
# /etc/my.cnf to set global options

How to repeat:
#1 Download http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-noinstall-5.1.42-win32.zip/from/pick?fi...

#2 Open my-small.ini

#3 See options/settings/items like

1. socket		= /tmp/mysql.sock

2. #innodb_data_home_dir = C:\mysql\data/

3. # You can copy this file to
   # /etc/my.cnf to set global options,
[1 Jan 2010 23:01] Roel Van de Paar
Verifying as D3.
[1 Jan 2010 23:31] Roel Van de Paar
To avoid confusion, I recommend using 

#innodb_data_home_dir=C:\\mysql\\data\\

(Ref bug #50021)
[25 May 2010 4:48] Roel Van de Paar
Any updates? 5.1.47 still has linux options.
[25 May 2010 10:15] Lars Heill
Recategorizing: content of config files (not packaging of them).
[18 Aug 2010 3:15] Roel Van de Paar
We are now 8.5 months later, and I still see the following in 5.1.49 and 5.5.5m3 default config files for Windows:

socket		= /tmp/mysql.sock

Making these changes is only a minor effort with a large effect for Windows users. Can this be looked at?
[18 Aug 2010 12:24] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/116098

3485 Georgi Kodinov	2010-08-18
      Bug #50021: Windows standard configuration files are showing Linux 
      options/settings
      
      1. Changed the default value for socket on Windows to the windows
      default
      2. Removed hard-coded trailing slashes from innodb_data_home_dir
      and innodb_log_group_name_dir.
[19 Aug 2010 7:07] Georgi Kodinov
my_small.ini

Attachment: my-small.ini (application/octet-stream, text), 2.38 KiB.

[19 Aug 2010 7:08] Georgi Kodinov
my_small.ini

Attachment: my-medium.ini (application/octet-stream, text), 4.75 KiB.

[19 Aug 2010 7:08] Georgi Kodinov
my-large.ini

Attachment: my-large.ini (application/octet-stream, text), 4.75 KiB.

[19 Aug 2010 7:09] Georgi Kodinov
my-huge.ini

Attachment: my-huge.ini (application/octet-stream, text), 4.77 KiB.

[19 Aug 2010 7:09] Georgi Kodinov
Roel,

Those are the generated files on my windows. Can you please take a look ?
[19 Aug 2010 23:15] Roel Van de Paar
Joro, thanks. Updates needed:

===== All files ===== 

s/
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is C:\mysql\data) or
# ~/.my.cnf to set user-specific options.
/ [for 5.1]
# To learn how option files are read on Windows, please see
# http://dev.mysql.com/doc/refman/5.1/en/option-files.html
/ [for 5.5]
# To learn how option files are read on Windows, please see
# http://dev.mysql.com/doc/refman/5.5/en/option-files.html
/ [for 5.6]
# To learn how option files are read on Windows, please see
# http://dev.mysql.com/doc/refman/5.6/en/option-files.html
/

s/
socket		= MySQL
/
/ 

The above needs to be done twice: once in [mysqld] and once in [client]!

s/
#innodb_data_home_dir = C:\mysql\data
/
#innodb_data_home_dir = C:\\mysql\\data
/

s/
#innodb_log_group_home_dir = C:\mysql\data
/
#innodb_log_group_home_dir = C:\\mysql\\data
/

===== my-medium.ini / my-large.ini / my-huge.ini ===== 

s/
#tmpdir		= /tmp/		
#log-update 	= /path-to-dedicated-directory/hostname
/
#tmpdir		= C:\\Windows\\Temp
/

Why do we still have log-update in our default config files?
http://dev.mysql.com/doc/refman/4.1/en/update-log.html

Please remove log-update from *all* (not just Windows) default my.ini/my.cnf configuration files.
[19 Aug 2010 23:18] Roel Van de Paar
Small correction: please add trailing double slashes (\\) to all path names above.
[23 Sep 2010 11:31] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/118927

3485 Georgi Kodinov	2010-09-23
      Bug #50021: Windows standard configuration files are showing Linux 
      options/settings
      
      1. Changed the default value for socket on Windows to the windows
      default
      2. Removed hard-coded trailing slashes from innodb_data_home_dir
      and innodb_log_group_name_dir.
      3. Added extra backslashes to the innodb directory example
[23 Sep 2010 11:33] Georgi Kodinov
generated INI files

Attachment: generated_ini_files.zip (application/zip, text), 8.87 KiB.

[27 Sep 2010 23:24] Roel Van de Paar
Discussing this with Joro via email. Ping me or Joro for info if needbe.
[28 Sep 2010 0:57] Roel Van de Paar
(See bug #57047 for named pipes info)
[30 Sep 2010 1:23] Roel Van de Paar
Putting back to verified. Result from email discussion Joro/Paul/Roel:

o A universal, OS-independent, header in regards option files (to be implemented for all OS'es, not just Windows):

# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html

o Still to be changed:

#tmpdir		= C:\\Windows\\Temp\\

o log-update line needs to be removed from all OS'es (not just Windows) configuration files.

o Add trailing double slashes (\\) to all path names for windows (not done yet)

o I would suggest removing:

socket		= MySQL

For Windows, since named pipes support is disabled by default and has to be turned on specifically. For someone who wants to set up named pipe support, they can always add this *if* they want a non-default pipe name. Also, it defaults to MySQL in any case, even if this option is not there. Removing this line for Windows avoids unnecessary confusion.
[3 Nov 2010 14:38] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/122717

3552 Georgi Kodinov	2010-11-03
      Bug #50021: Windows standard configuration files are showing Linux 
      options/settings
      
      1. Changed the default value for socket on Windows to the windows
      default
      2. Removed hard-coded trailing slashes from innodb_data_home_dir
      and innodb_log_group_name_dir.
      3. Added extra backslashes to the innodb directory example
      4. Made the tempdir platform "dependent"
      5. Fixed the comments in the .ini files
[3 Nov 2010 14:45] Georgi Kodinov
updated generated windows files

Attachment: support-files.zip (application/zip, text), 15.38 KiB.

[15 Nov 2010 1:10] Roel Van de Paar
Final patch looks fine, though I would change C:\\Windows\\temp\\ to C:\\Windows\\Temp\\ (note the uppercase T) given that this is how it looks in Windows (even though Windows is not a case-adhering OS);

15/11/2010  12:03 PM    <DIR>          Temp
[15 Nov 2010 1:21] Roel Van de Paar
Verified the "*T*emp" on Win7 and WinXP.
[15 Nov 2010 16:34] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/123941

3552 Georgi Kodinov	2010-11-15
      Bug #50021: Windows standard configuration files are showing Linux 
      options/settings
      
      1. Changed the default value for socket on Windows to the windows
      default
      2. Removed hard-coded trailing slashes from innodb_data_home_dir
      and innodb_log_group_name_dir.
      3. Added extra backslashes to the innodb directory example
      4. Made the tempdir platform "dependent"
      5. Fixed the comments in the .ini files
[15 Nov 2010 17:14] Vladislav Vaintroub
Joro,
I would suggest to remove tmpdir from templates as well. The defaults should be good.

Please take care when merging CMakeListst.txt into 5.5, it looks rather different. e.g localstatedir etc is somewhere else, in support-files/CMakeLists.txt rather than top-level.
[16 Nov 2010 0:52] Roel Van de Paar
Thinking about it/checking the same, I agree that it would be better to just remove it. Default seems to work nice;

mysql> show global variables like 'tmpdir';
+---------------+-----------------+
| Variable_name | Value           |
+---------------+-----------------+
| tmpdir        | C:\Windows\TEMP |
+---------------+-----------------+
1 row in set (0.07 sec)

Where does it get this setting from? Does not seem to be from env. variable?

c:\mysql557rc\bin>set | find /i "temp"
TEMP=C:\Users\Roel\AppData\Local\Temp
TMP=C:\Users\Roel\AppData\Local\Temp
[16 Nov 2010 0:54] Roel Van de Paar
Ah, it's from the sysvar named TEMP instead of from the user var TEMP.
[18 Nov 2010 23:03] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/124334

3511 Georgi Kodinov	2010-11-18
      Bug #50021: Windows standard configuration files are showing Linux 
       options/settings
       
       1. Changed the default value for socket on Windows to the windows
       default
       2. Removed hard-coded trailing slashes from innodb_data_home_dir
       and innodb_log_group_name_dir.
       3. Added extra backslashes to the innodb directory example
       4. Made the tempdir platform "dependent"
       5. Fixed the comments in the .ini files
       6. Removed the tmpdir from the templates and the scripts
[18 Nov 2010 23:13] Vladislav Vaintroub
Joro looks good, I only comment on patch comment

 4. Made the tempdir platform "dependent"

This is what you have done indeed, by removing tmpdir from template:)
[19 Nov 2010 2:43] Roel Van de Paar
btw, note that commment [16 Nov 1:54] is assumed (where it gets it from) instead of checked in the code. May be good to verify the same.
[19 Nov 2010 14:05] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/124452

3512 Georgi Kodinov	2010-11-18
      Bug #50021: Windows standard configuration files are showing Linux 
       options/settings
       
       1. Changed the default value for socket on Windows to the windows
       default
       2. Removed hard-coded trailing slashes from innodb_data_home_dir
       and innodb_log_group_name_dir.
       3. Added extra backslashes to the innodb directory example
       4. Made the tempdir platform "dependent"
       5. Fixed the comments in the .ini files
       6. Removed the tmpdir from the templates and the scripts
[5 Dec 2010 12:43] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (version source revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (merge vers: 5.6.1) (pib:23)
[14 Dec 2010 20:19] Paul DuBois
Noted in 5.1.54, 5.5.8 changelogs.

The Windows sample option files contained values more appropriate for Linux.
[15 Dec 2010 5:51] Bugs System
Pushed into mysql-5.1 5.1.55 (revid:sunanda.menon@oracle.com-20101215054055-vgwki317xg1wphhh) (version source revid:sunanda.menon@oracle.com-20101215054055-vgwki317xg1wphhh) (merge vers: 5.1.55) (pib:23)
[16 Dec 2010 22:33] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (version source revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (merge vers: 5.5.9) (pib:24)