Bug #42578 MySQL Server Instance Config Wizard - InnoDB Tablespace Pathway Incorrect
Submitted: 4 Feb 1:02 Modified: 4 Feb 18:45
Reporter: Anthony Abenojar
Status: Closed
Category:Server: Config Wizard Severity:S3 (Non-critical)
Version:5.1 OS:Microsoft Windows
Assigned to: Target Version:
Tags: wizard, datadir, innodb, configuration, windows

[4 Feb 1:02] Anthony Abenojar
Description:
On a reinstall of MySQL 5.1 (deleted all folders and files including old InnoDB files &
my.ini), when the config wizard created the MySQL service the mysqld.exe process would
crash seconds later.  It was because the datadir in my.ini was pointed to the incorrect
pathway.  

I had initially set the wizard to create the InnoDB tablespace in C:\Data via the InnoDB
Tablespace Settings in the Config Wizard, and it created the folder and files there fine.
 However, the my.ini file was setting the datadir to C:/Documents and Settings/All
Users/Application Data/MySQL/MySQL Server 5.1/Data/.

The problem is that when the wizard generates the my.ini file it points the datadir to
C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/ and then the
folder name you had specified.  The workaround would be to edit the datadir in my.ini to
point to the correct folder (C:\Data in my case) but any subsequent attempts to use the
wizard will still end up with the same behavior.

How to repeat:
-Uninstall MySQL 5.1 fully
-Reinstall MySQL 5.1 and use the Configuration Wizard but specify a different folder in
the InnoDB Tablespace Settings (other than Installation Path)

OR (Untested)
-move your data files to a different folder (not anywhere in C:/Documents and
Settings/All Users/Application Data/MySQL/MySQL Server 5.1/)
-Try reconfiguring your MySQL instance via the Configuration Wizard to go to that new
pathway

Suggested fix:
The process that generates the .ini file needs not to include the "/Documents and
Settings/All Users/Application Data/MySQL/MySQL Server 5.1/" pathway when writing the
datadir entry.

For all I know, there may be a registry entry or file hidden somewhere that is storing
that pathway for the wizard to use, so if that is the case maybe have the uninstaller
remove that entry or file.
[4 Feb 8:59] Sveta Smirnova
Thank you for the report.

I can not repeat described behavior.

Did you remove old my.ini file before re-install? Which exact version you try to install?
[4 Feb 17:04] Anthony Abenojar
I had deleted the folders located at the basedir and datadir of the previous installation
after uninstalling MySQL from Add or Remove Programs, including the old my.ini file.  I
am using MySQL 5.1.30.  Here is a part of the error log if it helps - this gets written
when the service crashes:

--START--

090204  8:54:50 - mysqld got exception 0xc0000005 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=26214400
read_buffer_size=65536
max_used_connections=0
max_threads=100
threads_connected=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 58231 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
006B8853    mysqld.exe!srv_parse_data_file_paths_and_sizes()[srv0start.c:211]
006A7E18    mysqld.exe!innobase_init()[ha_innodb.cc:1536]
00442748    mysqld.exe!ha_initialize_handlerton()[handler.cc:434]
00561253    mysqld.exe!plugin_initialize()[sql_plugin.cc:1002]
00565AE5    mysqld.exe!plugin_init()[sql_plugin.cc:1209]
004CE1B4    mysqld.exe!init_server_components()[mysqld.cc:3831]
004CE8C6    mysqld.exe!win_main()[mysqld.cc:4267]
004CECDB    mysqld.exe!mysql_service()[mysqld.cc:4439]
00724593    mysqld.exe!_callthreadstart()[thread.c:293]
0072462C    mysqld.exe!_threadstart()[thread.c:275]
7C80B713    kernel32.dll!GetModuleFileNameA()
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

--END--

I have noticed that innodb_data_home_dir was set to the exact pathway set in the InnoDB
Tablespace Settings, so I believe I was incorrect about the workaround as I still cannot
start the MySQL service without it crashing.
[4 Feb 18:20] Anthony Abenojar
Because InnoDB Tablespace Pathway sets the innodb_data_home_dir variable properly, I'm
changing the status to closed.
[4 Feb 18:45] Anthony Abenojar
As a side note, I managed to get the MySQL service running by commenting out all InnoDB
settings and setting the default storage engine to MyISAM.
[4 Feb 22:00] Sveta Smirnova
Thank you for the feedback.

Crash is most likely is same as in bug #36149 which fixed in version 5.1.31. Please wait
try 5.1.31 when it is released.