Today I just did a fresh rebuild of MySQL 5.1.19 on my Windows XP laptop using Visual Studio 2005. The build process is straight forward with few initial steps:

  1. I already have Visual Studio 2005 Professional edition installed.
  2. Installed cmake
  3. I also installed Windows Bison port, even though am not sure if I will change the parser code.
  4. Extracted the source files to a directory
  5. Ran win/configure WITH_INNOBASE_STORAGE_ENGINE from the top directory
  6. Once the configure completed; executed win\build-vs8.bat; which generated the project workspaces (sln and vcproj) without any problems.

Once I have the MySQL.sln project workspace file; loaded with Vistual Studio 2005 and started the debug build by making mysqld as the startup project. The build completed without any errors.

I started the mysqld debug server under debugger; and when I tried to connect and/or execute any query to this server; the server generates the error Run-Time Check Failure #3 - The variable ‘MYSQLlVal’ is being used without being initialized. I did not wanted to change the source code; so found a solution to turn off this run time checks by going to project settings -> mysqld properties -> Configuration properties -> C/C++ -> Code Generation and changed the Basic Runtime Checks value to “Stack Frames (/RTCs)” from “Both (/RTC1, equv. to /RTCsu)”. Once this this value is changed and did a complete rebuild of the mysqld project workspace; and the resulted debug server did not popup anymore runtime errors.