Bug #46917 mysqld-nt installs wrong
Submitted: 25 Aug 2009 12:53 Modified: 18 Dec 2009 11:45
Reporter: Henrik Gemal Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.0.85, 5.1.38 OS:Windows
Assigned to: Georgi Kodinov CPU Architecture:Any
Tags: regression

[25 Aug 2009 12:53] Henrik Gemal
Description:
if I run
C:\MySQL\bin>mysqld-nt.exe --install MySQL --defaults-files="C:\MySQL\my.ini"

I get:
"Service successfully installed."

which is fine, but the registry is wrong and makes the service unable to start. Getting the dreaded 1067 service failure!

The registry is set to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MySQL\ImagePath:
C:\MySQL\bin\mysqld-nt.exe C:\MySQL\my.ini MySQL

in the old version of mysql I get the following registry:
"C:\mysql\bin\mysqld-nt" --defaults-file="C:\mysql\my.ini" "mysql"

How to repeat:
run:
C:\MySQL\bin>mysqld-nt.exe --install MySQL --defaults-files="C:\MySQL\my.ini"

check registry:
[25 Aug 2009 12:53] Henrik Gemal
ahh wrong version
[25 Aug 2009 14:01] MySQL Verification Team
Thank you for the bug report. Which exactly MySQL install package have you used?. Thanks in advance.
[25 Aug 2009 14:06] Henrik Gemal
I use the zip file and then run the mysqld-nt from command line. Tried on bth windows xp and windows vista. same result.
[26 Aug 2009 7:41] Henrik Gemal
Let me know if you need any more info
[26 Aug 2009 8:06] Valeriy Kravchuk
Thank you for the bug report. Verified just as described on XP. As a workaround, either use Instance Configuration Wizard or edit the registry entry manually.
[31 Aug 2009 15:17] Valeriy Kravchuk
Bug #47023 was marked as a duplicate of this one.
[11 Sep 2009 14:16] Valeriy Kravchuk
5.1.38 is also affected. See Bug #47267 that is marked as a duplicate of this one.
[17 Sep 2009 11:25] 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/83587

2812 Georgi Kodinov	2009-09-17
      Bug #46917: mysqd-nt installs wrong
      
      When parsing the service installation parameter in 
      default_service_handling() make sure the value of the
      optional parameter doesn't overwrite it's name.
[18 Sep 2009 13:18] 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/83723

2812 Georgi Kodinov	2009-09-17
      Bug #46917: mysqd-nt installs wrong
      
      When parsing the service installation parameter in 
      default_service_handling() make sure the value of the
      optional parameter doesn't overwrite it's name.
[23 Sep 2009 9:53] Henrik Gemal
Was this fix included in version 5.0.86 ?
[23 Sep 2009 10:40] M. B.
Still in 5.1.39
[30 Sep 2009 8:18] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20090929093622-1mooerbh12e97zux) (version source revid:joro@sun.com-20090921090422-jz8bdfmapgq48seg) (merge vers: 6.0.14-alpha) (pib:11)
[6 Oct 2009 8:57] Bugs System
Pushed into 5.0.87 (revid:joro@sun.com-20091006073202-rj21ggvo2gw032ks) (version source revid:kristofer.pettersson@sun.com-20090929151855-gvpblm4dnnubypdv) (merge vers: 5.0.87) (pib:11)
[6 Oct 2009 9:01] Bugs System
Pushed into 5.1.40 (revid:joro@sun.com-20091006073316-lea2cpijh9r6on7c) (version source revid:joro@sun.com-20090918131958-2238vzh7ibvrolhc) (merge vers: 5.1.39) (pib:11)
[13 Oct 2009 9:41] MC Brown
A note has been added to the 5.0.87, 5.1.40, 6.0.14: 

       When creating a new instance using <command>mysqld-nt</command> and the <literal>--install</literal> parameter, the value of the service would be set incorrectly, resulting in a failure to start the configured service.
[22 Oct 2009 7:09] Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091022060553-znkmxm0g0gm6ckvw) (version source revid:alik@sun.com-20091013094238-g67x6tgdm9a7uik0) (merge vers: 5.5.0-beta) (pib:13)
[22 Oct 2009 22:01] M. B.
Tested 5.1.40: works fine again.
[30 Oct 2009 11:11] MC Brown
Changelog entry added to 5.5.0: 

When creating a new instance using <command>mysqld-nt</command> and the
<literal>--install</literal> parameter, the value of the service would be set incorrectly,
resulting in a failure to start the configured service.
[18 Dec 2009 10:39] Bugs System
Pushed into 5.1.41-ndb-7.1.0 (revid:jonas@mysql.com-20091218102229-64tk47xonu3dv6r6) (version source revid:jonas@mysql.com-20091218095730-26gwjidfsdw45dto) (merge vers: 5.1.41-ndb-7.1.0) (pib:15)
[18 Dec 2009 10:54] MC Brown
Added entry to 5.1.41-ndb-7.1.0
[18 Dec 2009 10:55] Bugs System
Pushed into 5.1.41-ndb-6.2.19 (revid:jonas@mysql.com-20091218100224-vtzr0fahhsuhjsmt) (version source revid:jonas@mysql.com-20091217101452-qwzyaig50w74xmye) (merge vers: 5.1.41-ndb-6.2.19) (pib:15)
[18 Dec 2009 10:59] MC Brown
Added entry to 5.1.41-ndb-6.2.19
[18 Dec 2009 11:10] Bugs System
Pushed into 5.1.41-ndb-6.3.31 (revid:jonas@mysql.com-20091218100616-75d9tek96o6ob6k0) (version source revid:jonas@mysql.com-20091217154335-290no45qdins5bwo) (merge vers: 5.1.41-ndb-6.3.31) (pib:15)
[18 Dec 2009 11:24] Bugs System
Pushed into 5.1.41-ndb-7.0.11 (revid:jonas@mysql.com-20091218101303-ga32mrnr15jsa606) (version source revid:jonas@mysql.com-20091218064304-ezreonykd9f4kelk) (merge vers: 5.1.41-ndb-7.0.11) (pib:15)
[18 Dec 2009 11:45] MC Brown
Already documented in 5.1.41