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:
None 
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
Description:
Compiling latest source, the below error is launched by compiler:

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

/sql/mysqld.cc

static BOOL WINAPI console_event_handler( DWORD type ) 
{
  DBUG_ENTER("console_event_handler");
  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) <<<<<<<<<<<<<<<<<<<<<<<<<

and:

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

How to repeat:
Compile latest source.

Suggested fix:
See description.