Bug #35758 Embedded Server compiling broken on Windows
Submitted: 2 Apr 2008 2:58 Modified: 9 Apr 2008 16:33
Reporter: Miguel Solorzano Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.1 OS:Windows
Assigned to: Vladislav Vaintroub CPU Architecture:Any

[2 Apr 2008 2:58] Miguel Solorzano
Compiling latest source, the below error is launched by compiler:

c:\dbs\mysql-5.1\sql\mysqld.cc(1959): error C2065: 'hEventShutdown' : undeclared identifier


static BOOL WINAPI console_event_handler( DWORD type ) 
  if(type == CTRL_C_EVENT)
       Do not shutdown before startup is finished and shutdown
       thread is initialized. Otherwise there is a race condition 
       between main thread doing initialization and CTRL-C thread doing
       cleanup, which can result into crash.
     if(hEventShutdown) <<<<<<<<<<<<<<<<<<<<<<<<<


#if !defined(EMBEDDED_LIBRARY)
static HANDLE hEventShutdown;
static char shutdown_event_name[40];

How to repeat:
Compile latest source.

Suggested fix:
See description.