Bug #69917 mysql-5.5.33-winx64.msi installs as 32 bit
Submitted: 3 Aug 2013 10:37 Modified: 26 Jan 2017 6:25
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.5.33 OS:Windows (7/64)
Assigned to: CPU Architecture:Any

[3 Aug 2013 10:37] Peter Laursen
Description:
After downloading and installing mysql-5.5.33-winx64.msi from dev.mysql.com yesterday night I notice that it does not upgrade my 5.5.32 (64 bit) instance.

mysql-5.5.33-winx64.msi installs to "program files (x86)" and not "program files" as a 64 bit binary should on 64 bit Windows. "program files" is where my existing 5.5.32 instance resides.

I am not able to determine whether
1) the binary is a 64 binary that ('only' gets installed to wrong installation folder due to a bug in the installation script)
2) or if the package contains a 32 bit server binary.

How to repeat:
See above.

Suggested fix:
Provide a proper 64 bit .msi installer package.
[3 Aug 2013 10:42] Peter Laursen
I can click the 'custom' button and change the patch successfully, though.

But not sure if I now have installed a 32 bit or 64 bit server!
[3 Aug 2013 12:15] Peter Laursen
Actually I have more information/more details.

By mistake I first isntalled the 32 bit version.  Whne I realized this mistake I uninstalled (from Control panle .. programs) and deleted the installation folder in \program files (x86).

I next downloaded the 64 bit version. It installed to http://bugs.mysql.com/bug.php?id=69918. Checking the details behind the 'Custom' button' the default path was \program files (x86).

So maybe in order to reproduce this it will be necessary to install the 32 bit version first (if the 5.5.33 installer *remembers* where installation took place last time).  But even if so it is a bug. The installer for the 64 bit version should not *remember* 32 bit installation details and vice versa.

I know that the installer itself for both 'bit depths' are 32 bit - and maybe even exactly the same.  But if such details are stored in registry for later use, the 32 and 64 bit installers should use separate registry keys.
[3 Aug 2013 13:36] Peter Laursen
To what I wrote "But not sure if I now have installed a 32 bit or 64 bit server!"

.. I am not in doubt now. 'version_compile_os' variable returns "Win64". So the package does contain a 64 bit server binary according to this variable.

But still it tried to install to the 32 bit installation path on 64 bit systems ("\program files (x86)"). I had to click the 'Custom' button and change the path.
[5 Aug 2013 8:16] MySQL Verification Team
I found it remembers the last installation in the registry. In my case last time I used .msi to install was to d:\tmp\5.5.29\ which was in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MySQL AB\MySQL Server 5.5

After removing that key, I then checked again and the default path was back to C:\Program Files\MySQL\MySQL Server 5.5\ which is correct for package
mysql-5.5.33-winx64.msi

I am not sure which behaviour is correct, so will leave it up to somebody who
knows this better.
[5 Aug 2013 8:52] Peter Laursen
32 bit and 64 bit installer packages should use separate registry keys for 'remembering' details from previous installation.
[26 Jan 2017 6:25] Erlend Dahl
Posted by developer:

[17 Jan 2017 6:25] Piotr Obrzut 

I did verify this bug with 5.7.16 32bit and 5.7.17 64bit installers and it
still seems to be happening.

I see two potential fixes:
1. Remove the previously installed 32bit version entirely while installing to
a new location (64bit program files).
2. Have the 32bit version work independently along the 64bit version.

I don't think we should be fixing this though. This error will only happen in
cases where someone will install the 64bit version following the 32bit
install, which is likely to happen only in case of a mistake. Potential fixes
are quite likely to be problematic (for instance in the case where someone
will decide to use the default data directory which is in the install
folder).