List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:November 20 2006 12:37pm
Subject:bk commit into 5.1 tree (anozdrin:1.2372)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 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@stripped, 2006-11-20 15:37:12+03:00, anozdrin@stripped +5 -0
  Polishing + make the code compiled on Windows.

  server-tools/instance-manager/listener.cc@stripped, 2006-11-20 15:37:04+03:00, anozdrin@stripped +2 -2
    Polishing: declare variable prior to the first statement in block.

  server-tools/instance-manager/listener.h@stripped, 2006-11-20 15:37:04+03:00, anozdrin@stripped +13 -6
    Polishing.

  server-tools/instance-manager/manager.cc@stripped, 2006-11-20 15:37:04+03:00, anozdrin@stripped +1 -2
    Make Manager::manager_pid local variable.

  server-tools/instance-manager/manager.h@stripped, 2006-11-20 15:37:04+03:00, anozdrin@stripped +1 -2
    Make Manager::manager_pid local variable.

  server-tools/instance-manager/thread_registry.cc@stripped, 2006-11-20 15:37:04+03:00, anozdrin@stripped +1 -1
    Polsihing.

# 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:	booka.site
# Root:	/home/alik/MySQL/devel/5.1-rt-im

--- 1.34/server-tools/instance-manager/listener.cc	2006-11-20 15:37:20 +03:00
+++ 1.35/server-tools/instance-manager/listener.cc	2006-11-20 15:37:20 +03:00
@@ -82,11 +82,11 @@ void Listener::run()
 {
   int i, n= 0;
 
-  log_info("Listener: started.");
-
 #ifndef __WIN__
   struct sockaddr_un unix_socket_address;
 #endif
+
+  log_info("Listener: started.");
 
   thread_registry->register_thread(&thread_info);
 

--- 1.8/server-tools/instance-manager/listener.h	2006-11-20 15:37:20 +03:00
+++ 1.9/server-tools/instance-manager/listener.h	2006-11-20 15:37:20 +03:00
@@ -34,21 +34,28 @@ class Listener: public Thread
 {
 public:
   Listener(Thread_registry *thread_registry_arg, User_map *user_map_arg);
+
 protected:
   virtual void run();
+
+private:
+  static const int LISTEN_BACK_LOG_SIZE= 5;     /* standard backlog size */
+
 private:
   Thread_info thread_info;
   Thread_registry *thread_registry;
   User_map *user_map;
-  static const int LISTEN_BACK_LOG_SIZE= 5;     /* standard backlog size */
+
   ulong total_connection_count;
 
-  int     sockets[2];
-  int     num_sockets;
-  fd_set  read_fds;
+  int sockets[2];
+  int num_sockets;
+  fd_set read_fds;
+
+private:
   void handle_new_mysql_connection(struct st_vio *vio);
-  int   create_tcp_socket();
-  int   create_unix_socket(struct sockaddr_un &unix_socket_address);
+  int create_tcp_socket();
+  int create_unix_socket(struct sockaddr_un &unix_socket_address);
 };
 
 #endif // INCLUDES_MYSQL_INSTANCE_MANAGER_LISTENER_H

--- 1.40/server-tools/instance-manager/manager.cc	2006-11-20 15:37:20 +03:00
+++ 1.41/server-tools/instance-manager/manager.cc	2006-11-20 15:37:20 +03:00
@@ -114,7 +114,6 @@ Guardian *Manager::p_guardian;
 Instance_map *Manager::p_instance_map;
 Thread_registry *Manager::p_thread_registry;
 User_map *Manager::p_user_map;
-pid_t Manager::manager_pid;
 
 /*
   manager - entry point to the main instance manager process: start
@@ -131,6 +130,7 @@ int Manager::main()
   int rc= 1;
   const char *err_msg;
   bool shutdown_complete= FALSE;
+  pid_t manager_pid= getpid();
 
   Thread_registry thread_registry;
   /*
@@ -146,7 +146,6 @@ int Manager::main()
 
   Listener listener(&thread_registry, &user_map);
 
-  manager_pid= getpid();
   p_instance_map= &instance_map;
   p_guardian= instance_map.guardian= &guardian;
   p_thread_registry= &thread_registry;

--- 1.8/server-tools/instance-manager/manager.h	2006-11-20 15:37:20 +03:00
+++ 1.9/server-tools/instance-manager/manager.h	2006-11-20 15:37:20 +03:00
@@ -38,12 +38,11 @@ public:
   static Guardian *get_guardian() { return p_guardian; }
   static Thread_registry *get_thread_registry() { return p_thread_registry; }
   static User_map *get_user_map() { return p_user_map; }
-  static pid_t get_manager_pid() { return manager_pid; }
 
 private:
   static void stop_all_threads();
+
 private:
-  static pid_t manager_pid;
   static Guardian *p_guardian;
   static Instance_map *p_instance_map;
   static Thread_registry *p_thread_registry;

--- 1.13/server-tools/instance-manager/thread_registry.cc	2006-11-20 15:37:20 +03:00
+++ 1.14/server-tools/instance-manager/thread_registry.cc	2006-11-20 15:37:20 +03:00
@@ -371,7 +371,7 @@ bool Thread::start_detached()
   pthread_attr_init(&attr);
   pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
   rc= set_stacksize_and_create_thread(&thd_id, &attr,
-                                    Thread::thread_func, this);
+                                      Thread::thread_func, this);
   pthread_attr_destroy(&attr);
 
   return rc != 0;
Thread
bk commit into 5.1 tree (anozdrin:1.2372)Alexander Nozdrin20 Nov