Bug #68312 MySQL on windows 64 still report as 32Bit
Submitted: 8 Feb 2013 2:45 Modified: 8 Feb 2013 8:12
Reporter: Marco Tusa Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:5.5.11 OS:Windows (64bit)
Assigned to: CPU Architecture:Any
Tags: 64 bit, Compilation

[8 Feb 2013 2:45] Marco Tusa
Description:
Download and Instal MySQL for windows 64 when you run it and connect "show global variables" shows:
version                                           | 5.5.11-log
version_comment                                   | MySQL Community Server (GPL)
version_compile_machine                           | x86
version_compile_os                                | Win64

 instead the expected 64_x86

I am wondering if this is just a reporting problem from the Variables or if there is a problem in the compilation of the binaries.

How to repeat:
Just download windows 64 bit version and try
[8 Feb 2013 8:11] Erlend Dahl
This is a known issue that comes from a limitation in cmake. It is not a problem in the binaries.

We have worked around this issue in 5.6 so that it sets compile_machine to x86_64 when compiling a 64 bit binary

From the internal analysis:

The CMAKE_SYSTEM_PROCESSOR cmake variable used will indeed always show x86 on Windows. This is because it's showing the appropriate value for the type of application used to retrieve it : 32 bit binaries will *always* get "x86" no matter if the OS they're running on is 32 or 64 bit. Ditto 64 bit binaries will always get the 64 bit value.

And since cmake is an 32 bit application (with no known 64 bit version) CMAKE_SYSTEM_PROCESSOR will always get the value of "x86" on windows when generating the config.h file.

This is a known cmake deficiency that they don't even plan on fixing:

  http://public.kitware.com/Bug/view.php?id=9065 

and maintain that CMAKE_SYSTEM_PROCESSOR behaves exactly like documented (uses
PROCESSOR_ARCHITECTURE on windows) :

  http://cmake.org/cmake/help/cmake-2-8-docs.html#variable:CMAKE_SYSTEM_PROCESSOR
[8 Feb 2013 8:12] Erlend Dahl
Closing this since the problem has been fixed in a later release.