List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:May 29 2006 1:26pm
Subject:bk commit into 5.0 tree (anozdrin:1.2146) BUG#19391
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of alik. When alik does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2146 06/05/29 17:26:52 anozdrin@stripped +1 -0
  Fix for BUG#19391: IM fails to start after two executions

  server-tools/instance-manager/manager.cc
    1.33 06/05/29 17:26:50 anozdrin@stripped +24 -22
    Start Listener-thread after all initialization.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	anozdrin
# Host:	station.home
# Root:	/mnt/raid/MySQL/devel/5.0-rt-bug19391

--- 1.32/server-tools/instance-manager/manager.cc	2006-05-06 13:57:53 +04:00
+++ 1.33/server-tools/instance-manager/manager.cc	2006-05-29 17:26:50 +04:00
@@ -147,28 +147,6 @@
   if (create_pid_file(options.pid_file_name, manager_pid))
     return;
 
-  sigset_t mask;
-  set_signals(&mask);
-
-  /* create the listener */
-  {
-    pthread_t listener_thd_id;
-    pthread_attr_t listener_thd_attr;
-    int rc;
-
-    pthread_attr_init(&listener_thd_attr);
-    pthread_attr_setdetachstate(&listener_thd_attr, PTHREAD_CREATE_DETACHED);
-    rc= set_stacksize_n_create_thread(&listener_thd_id, &listener_thd_attr,
-                                      listener, &listener_args);
-    pthread_attr_destroy(&listener_thd_attr);
-    if (rc)
-    {
-      log_error("manager(): set_stacksize_n_create_thread(listener) failed");
-      goto err;
-    }
-
-  }
-
   /* create guardian thread */
   {
     pthread_t guardian_thd_id;
@@ -209,6 +187,30 @@
                "the wrong config file options. For instance, missing mysqld "
                "binary. Aborting.");
     return;
+  }
+
+  /* Initialize signals and alarm-infrastructure. */
+
+  sigset_t mask;
+  set_signals(&mask);
+
+  /* create the listener */
+  {
+    pthread_t listener_thd_id;
+    pthread_attr_t listener_thd_attr;
+    int rc;
+
+    pthread_attr_init(&listener_thd_attr);
+    pthread_attr_setdetachstate(&listener_thd_attr, PTHREAD_CREATE_DETACHED);
+    rc= set_stacksize_n_create_thread(&listener_thd_id, &listener_thd_attr,
+                                      listener, &listener_args);
+    pthread_attr_destroy(&listener_thd_attr);
+    if (rc)
+    {
+      log_error("manager(): set_stacksize_n_create_thread(listener) failed");
+      goto err;
+    }
+
   }
 
   /*
Thread
bk commit into 5.0 tree (anozdrin:1.2146) BUG#19391Alexander Nozdrin29 May