List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:November 25 2008 8:55pm
Subject:bzr push into mysql-5.0-bugteam branch (vvaintroub:2713)
View as plain text  
 2713 Vladislav Vaintroub	2008-11-25 [merge]
      merge
modified:
  client/mysqlcheck.c
  mysql-test/include/check-testcase.test
  mysql-test/r/ctype_utf8.result
  mysql-test/r/federated.result
  mysql-test/r/fulltext.result
  mysql-test/r/func_group.result
  mysql-test/r/mysqlcheck.result
  mysql-test/r/subselect.result
  mysql-test/r/type_newdecimal.result
  mysql-test/t/ctype_utf8.test
  mysql-test/t/federated.test
  mysql-test/t/federated_innodb.test
  mysql-test/t/fulltext.test
  mysql-test/t/func_group.test
  mysql-test/t/mysqlcheck.test
  mysql-test/t/subselect.test
  mysql-test/t/type_newdecimal.test
  sql/ha_federated.cc
  sql/handler.cc
  sql/handler.h
  sql/item_cmpfunc.cc
  sql/item_func.cc
  sql/item_timefunc.cc
  sql/parse_file.cc
  sql/parse_file.h
  sql/sql_db.cc
  sql/sql_select.cc
  sql/sql_table.cc
  sql/sql_trigger.cc
  sql/sql_view.cc
  sql/table.h

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2008-10-09 07:26:42 +0000
+++ b/sql/mysqld.cc	2008-11-14 01:01:41 +0000
@@ -3840,6 +3840,9 @@ we force server id to 2, but this MySQL 
                                                        : 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();

=== modified file 'sql/nt_servc.cc'
--- a/sql/nt_servc.cc	2004-03-25 21:29:45 +0000
+++ b/sql/nt_servc.cc	2008-11-14 01:01:41 +0000
@@ -245,10 +245,6 @@ void NTService::ServiceMain(DWORD argc, 
   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);
 
@@ -264,6 +260,14 @@ error:
   return;
 }
 
+
+void NTService::SetRunning()
+{
+  if (pService)
+    pService->SetStatus(SERVICE_RUNNING,NO_ERROR, 0, 0, 0);
+}
+
+
 /* ------------------------------------------------------------------------
    StartService() - starts the appliaction thread
  -------------------------------------------------------------------------- */

=== modified file 'sql/nt_servc.h'
--- a/sql/nt_servc.h	2005-02-09 20:02:48 +0000
+++ b/sql/nt_servc.h	2008-11-14 01:01:41 +0000
@@ -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;

Thread
bzr push into mysql-5.0-bugteam branch (vvaintroub:2713)Vladislav Vaintroub25 Nov