Loading sql/mysqld.cc +3 −0 Original line number Diff line number Diff line Loading @@ -3840,6 +3840,9 @@ we force server id to 2, but this MySQL server will not act as a slave."); : mysqld_unix_port), mysqld_port, MYSQL_COMPILATION_COMMENT); #if defined(_WIN32) && !defined(EMBEDDED_LIBRARY) Service.SetRunning(); #endif #if defined(__NT__) || defined(HAVE_SMEM) handle_connections_methods(); Loading sql/nt_servc.cc +8 −4 Original line number Diff line number Diff line Loading @@ -245,10 +245,6 @@ void NTService::ServiceMain(DWORD argc, LPTSTR *argv) if (!pService->StartService()) goto error; // Check that the service is now running. if (!pService->SetStatus(SERVICE_RUNNING,NO_ERROR, 0, 0, 0)) goto error; // wait for exit event WaitForSingleObject (pService->hExitEvent, INFINITE); Loading @@ -264,6 +260,14 @@ void NTService::ServiceMain(DWORD argc, LPTSTR *argv) return; } void NTService::SetRunning() { if (pService) pService->SetStatus(SERVICE_RUNNING,NO_ERROR, 0, 0, 0); } /* ------------------------------------------------------------------------ StartService() - starts the appliaction thread -------------------------------------------------------------------------- */ Loading sql/nt_servc.h +13 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,19 @@ class NTService BOOL IsService(LPCSTR ServiceName); BOOL got_service_option(char **argv, char *service_option); BOOL is_super_user(); void Stop(void); //to be called from app. to stop service /* SetRunning() is to be called by the application when initialization completes and it can accept stop request */ void SetRunning(void); /* Stop() is to be called by the application to stop the service */ void Stop(void); protected: LPSTR ServiceName; Loading Loading
sql/mysqld.cc +3 −0 Original line number Diff line number Diff line Loading @@ -3840,6 +3840,9 @@ we force server id to 2, but this MySQL server will not act as a slave."); : mysqld_unix_port), mysqld_port, MYSQL_COMPILATION_COMMENT); #if defined(_WIN32) && !defined(EMBEDDED_LIBRARY) Service.SetRunning(); #endif #if defined(__NT__) || defined(HAVE_SMEM) handle_connections_methods(); Loading
sql/nt_servc.cc +8 −4 Original line number Diff line number Diff line Loading @@ -245,10 +245,6 @@ void NTService::ServiceMain(DWORD argc, LPTSTR *argv) if (!pService->StartService()) goto error; // Check that the service is now running. if (!pService->SetStatus(SERVICE_RUNNING,NO_ERROR, 0, 0, 0)) goto error; // wait for exit event WaitForSingleObject (pService->hExitEvent, INFINITE); Loading @@ -264,6 +260,14 @@ void NTService::ServiceMain(DWORD argc, LPTSTR *argv) return; } void NTService::SetRunning() { if (pService) pService->SetStatus(SERVICE_RUNNING,NO_ERROR, 0, 0, 0); } /* ------------------------------------------------------------------------ StartService() - starts the appliaction thread -------------------------------------------------------------------------- */ Loading
sql/nt_servc.h +13 −1 Original line number Diff line number Diff line Loading @@ -56,7 +56,19 @@ class NTService BOOL IsService(LPCSTR ServiceName); BOOL got_service_option(char **argv, char *service_option); BOOL is_super_user(); void Stop(void); //to be called from app. to stop service /* SetRunning() is to be called by the application when initialization completes and it can accept stop request */ void SetRunning(void); /* Stop() is to be called by the application to stop the service */ void Stop(void); protected: LPSTR ServiceName; Loading