Bug #6627 Configuration Wizard does not save innodb_data_home_dir path to my.ini
Submitted: 15 Nov 2004 9:00 Modified: 15 Apr 2008 23:25
Reporter: Tom Metro Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:4.1.7, 5.0 OS:Windows (Windows XP)
Assigned to: Iggy Galarza CPU Architecture:Any
Tags: innodb, instance config wizard, windows

[15 Nov 2004 9:00] Tom Metro
Description:
The MySQL Server Instance Configuration Wizard on Windows appears to not save the specified  innodb_data_home_dir path to the my.ini under certain circumstances.

How to repeat:
Run Configuration Wizard.
Choose these options:
  Detailed Configuration
  Developer Machine
  Multifunctional Database

At the "InnoDB Tablespace Settings" enter a path, such as "c:\var\database\MySQL\InnoDB\"

Complete the rest of the Wizard.

Observe the relevant portion of the my.ini:

> #*** INNODB Specific options ***
> 
> 
> # Use this option if you have a MySQL server with InnoDB support enabled
> # but you do not plan to use it. This will save memory and disk space
> # and speed up some things.
> #skip-innodb

Conversely, when I installed 4.1.7 on a Windows NT box, I got:

> #*** INNODB Specific options ***
> innodb_data_home_dir=C:/var/pgm/mysql/

as expected.

Note, this Windows XP installation was to a path with a "#" in it, as detailed in bug #6625, which might be impacting this behavior.

Suggested fix:
Unknown.
[17 Nov 2004 22:14] MySQL Verification Team
I was'nt able to repeat that ay my side (see below) notice that
the Server Configuration Wizard needs that you 
select the option for the InnoDB path and there is a combo
with several options.

#*** INNODB Specific options ***
innodb_data_home_dir=E:/Data/

# Use this option if you have a MySQL server with InnoDB support enabled
# but you do not plan to use it. This will save memory and disk space
# and speed up some things.
#skip-innodb
[18 Nov 2004 3:09] Tom Metro
Miguel Solorzano writes:
> I wasn't able to repeat that at my side...

I'm not surprised, as I only observed the problem on one of two machines where I installed MySQL, but on the machine where it happened, it happened consistently.

There are a couple of obvious causes:

1. It could be the operating system. I saw the problem on Windows XP, but not Windows NT. However this seems unlikely. (There would be other reports if that was the case.)

2. It could be related to the bug I referenced above (#6625) where the Wizard/template doesn't quote paths, and gets tripped up by paths with "#" in them.

To narrow the possibilities, and see if the "#" bug is a factor in this, either the "#" bug needs to be fixed, and then I'll repeat the test case on my machine where the problem was observed, or you should perform a test install that utilizes an install path including "#" and see if the problem is reproducible. (Note, in my test case only the basedir and datadir path had a "#" in them. The innodb_data_home_dir path did not.)

I'm assuming the latter should be the faster option. If it is successful at reproducing the problem, then this bug can be marked as a dependent on bug #6625.

 -Tom
[2 Jan 2005 20:20] MySQL Verification Team
Notice that if you are using # as part of the directory install path,
then isn't Cinfiguration Wizard issue, but instead that the server
can't handles this type of path:

Microsoft Windows XP [versão 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

d:\>c:

C:\>cd #mysql

C:\#mysql>touch d:\windows\my.ini

C:\#mysql>d:\windows\my.ini

C:\#mysql>cd bin

C:\#mysql\bin>mysqld-nt --standalone --console
050102 18:16:39 [ERROR] Can't find messagefile 'c:\share\english\errmsg.sys'
050102 18:16:39 [ERROR] Aborting

C:\#mysql\bin>type d:\windows\my.ini
[mysqld]
basedir=c:/#mysql
datadir=c:/#mysql/data
C:\#mysql\bin>
[3 Jan 2005 2:48] Tom Metro
Miguel Solorzano writes:
> Notice that if you are using # as part of the directory install 
> path, then isn't Cinfiguration Wizard issue, but instead that the 
> server can't handles this type of path...

You are getting confused with bug #6625. Your test case in part demonstrates that bug. That bug report also illustrates that if quotations are placed around the values, the server works fine, which suggests that if the Wizard was altered to include the quotes appropriately, the problem would not happen. A similar situation may be occurring with this bug.

For this bug, the test case should only involve running the Wizard and examining the generated configuration file to see whether the innodb_data_home_dir directive is present or not. Whether the server fails to start for other reasons is irrelevant to this bug.

See also my second comment on bug #6625 which might provide some clues as to the cause of this problem.

 -Tom
[14 Feb 2005 22:54] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[15 Feb 2005 0:08] Tom Metro
> No feedback was provided for this bug for over a month...

I'm not sure why the feedback I posted on 2005-01-02 did not alter the "need feedback" status.

If my comment didn't address what whas asked, please restate.

 -Tom
[29 Mar 2005 17:51] MySQL Verification Team
I tested the version 4.1.10a and the Innodb data path was saved:

#*** INNODB Specific options ***
innodb_data_home_dir="C:/var/database/MySQL/InnoDB/"
[8 Feb 2008 17:52] Patrick Crews
The Windows Instance Configuration Wizard does not always write the user-specified innodb_data_home_dir value to my.ini.

When the user specifies a location other than a suggested one, the value will not be written if the path ends with '\'.

If the trailing '\' is removed, the value will be written to my.ini

To Repeat:
########################
1) Install MySQL 5.0 on Windows.  
2) Configure the server.
3) Choose detailed configuration
4) Choose developer machine
5) Choose multifunctional database
6) When the InnoDB Tablespace settings screen appears, choose a path other than the wizard-supplied choices.  EX:  C:\MySQL\innodb_test_dir\

NOTE:  Use the '...' Button the select the directory - the trailing '\' is automatically added when selecting a directory this way.

7) Continue with configuration as desired.
8) On successful completion of configuration, open the my.ini file of the MySQL server you just installed and configured.  You will note there is no innodb_data_home_dir value.

9)  Repeat 1-7 but remove the trailing '\' and you will note the my.ini contains the correct innodb_data_home_dir value

Suggestions:
Alter the instance config wizard to ensure a trailing '\' in the InnoDB tablespace path is ignored, dropped, etc during processing / creation of the my.ini file.

Workaround:  
Users can manually remove the trailing '\' when setting an alternate Innodb tablespace path.
[12 Mar 2008 14:52] Patrick Crews
Ok to push.

Verified that innodb_data_home_dir path is correctly written to my.ini file whether or not the input path contains a trailing '\' character or not.
[14 Mar 2008 20:52] Iggy Galarza
Pushed changes for MySQLInstanceConfig that will be available in version 1.0.12.0
[15 Apr 2008 23:25] Paul DuBois
Noted in 5.0.60, 5.1.24, 6.0.5 changelogs.

MySQLInstanceConfig.exe did not save the innodb_data_home_dir value
to the my.ini file under certain circumstances.