List:Internals« Previous MessageNext Message »
From:Petr Chardin Date:June 7 2005 1:57pm
Subject:bk commit into 5.0 tree (petr:1.1937)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of cps. When cps 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.1937 05/06/07 17:57:20 petr@stripped +4 -0
  several fixes to the previous patch

  server-tools/instance-manager/parse_output.h
    1.5 05/06/07 17:57:15 petr@stripped +2 -1
    portability fix

  server-tools/instance-manager/parse_output.cc
    1.10 05/06/07 17:57:15 petr@stripped +1 -1
    remove stupid comment

  server-tools/instance-manager/instance_options.h
    1.15 05/06/07 17:57:15 petr@stripped +2 -1
    portability fix

  server-tools/instance-manager/instance_options.cc
    1.20 05/06/07 17:57:15 petr@stripped +5 -5
    fix order of if branches

# 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:	petr
# Host:	owlet.
# Root:	/home/cps/mysql/trees/mysql-5.0

--- 1.19/server-tools/instance-manager/instance_options.cc	2005-06-07 15:46:57 +04:00
+++ 1.20/server-tools/instance-manager/instance_options.cc	2005-06-07 17:57:15 +04:00
@@ -370,19 +370,19 @@
     if (!gethostname(hostname, sizeof(hostname) - 1))
     {
       if (instance_type & DEFAULT_SINGLE_INSTANCE)
-        strxnmov(pidfilename, MAX_PATH_LEN - 1, "--pid-file=", instance_name, "-",
-                 hostname, ".pid", NullS);
-      else
         strxnmov(pidfilename, MAX_PATH_LEN - 1, "--pid-file=", hostname,
                  ".pid", NullS);
+      else
+        strxnmov(pidfilename, MAX_PATH_LEN - 1, "--pid-file=", instance_name,
+                 "-", hostname, ".pid", NullS);
     }
     else
     {
       if (instance_type & DEFAULT_SINGLE_INSTANCE)
-        strxnmov(pidfilename, MAX_PATH_LEN - 1, "--pid-file=", instance_name,
+        strxnmov(pidfilename, MAX_PATH_LEN - 1, "--pid-file=", "mysql",
                  ".pid", NullS);
       else
-        strxnmov(pidfilename, MAX_PATH_LEN - 1, "--pid-file=", "mysql",
+        strxnmov(pidfilename, MAX_PATH_LEN - 1, "--pid-file=", instance_name,
                  ".pid", NullS);
     }
 

--- 1.14/server-tools/instance-manager/instance_options.h	2005-06-07 15:46:57 +04:00
+++ 1.15/server-tools/instance-manager/instance_options.h	2005-06-07 17:57:15 +04:00
@@ -34,7 +34,8 @@
   don't have to synchronize between threads.
 */
 
-enum { USUAL_INSTANCE= 0, DEFAULT_SINGLE_INSTANCE };
+#define USUAL_INSTANCE 0
+#define DEFAULT_SINGLE_INSTANCE 1
 
 class Instance_options
 {

--- 1.9/server-tools/instance-manager/parse_output.cc	2005-06-07 15:46:57 +04:00
+++ 1.10/server-tools/instance-manager/parse_output.cc	2005-06-07 17:57:15 +04:00
@@ -86,7 +86,7 @@
         an option value) or the whole line (if flag)
       */
       linep+= found_word_len;                     /* swallow the previous one */
-      if (flag & GET_VALUE)    /* not GET_LINE */
+      if (flag & GET_VALUE)
       {
         get_word((const char **) &linep, &found_word_len, NONSPACE);
         if (input_buffer_len <= found_word_len)

--- 1.4/server-tools/instance-manager/parse_output.h	2005-06-07 15:46:57 +04:00
+++ 1.5/server-tools/instance-manager/parse_output.h	2005-06-07 17:57:15 +04:00
@@ -16,7 +16,8 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
-enum { GET_VALUE= 1, GET_LINE };
+#define GET_VALUE 1
+#define GET_LINE  2
 
 int parse_output_and_get_value(const char *command, const char *word,
                                char *result, size_t input_buffer_len,
Thread
bk commit into 5.0 tree (petr:1.1937)Petr Chardin7 Jun