Bug #19043 IM aborts if mysqld-path is not valid
Submitted: 12 Apr 2006 10:43 Modified: 30 Jun 2007 21:51
Reporter: Alexander Nozdrin Email Updates:
Status: Duplicate Impact on me:
None 
Category:Instance Manager Severity:S2 (Serious)
Version:5.1.10-beta-BK OS:Windows (Windows)
Assigned to: Assigned Account CPU Architecture:Any

[12 Apr 2006 10:43] Alexander Nozdrin
Description:
Instance Manager aborts on start or on creation of an instance if path
to mysqld-executable is not correct. The path to mysqld-executable
can be wrong if default-mysqld-path and/or mysqld-path are set to
incorrect values.

IM tries to get version information right after registration of
a new instance by mean of invocation of mysqld-executable with
--no-defaults --version options. popen() is used to achieve this.

The problem is that popen() on Windows does not return NULL
in case of failure. So, the check of errors does not work and IM
works with invalid FILE-handle, which leads to coredump.

How to repeat:
1. Creare a minimal .my.ini with one mysqld-instance ([mysqld] section)
and w/o any default-mysqld-path and mysqld-path options. Start IM.

2. Create a minimal .my.ini without any mysqld-instances. Start IM and
create any instance w/o specifying mysqld-path option.

Suggested fix:
Use Windows-native way to create a child process with redirected output:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/creating_a_c...
[12 Apr 2006 13:37] MySQL Verification Team
Thank you for the bug report.
[4 Jun 2007 21:24] Alexander Nozdrin
This is a duplicate of BUG#28012, which is sr5-1.