List:Commits« Previous MessageNext Message »
From:msvensson Date:February 20 2007 3:19pm
Subject:bk commit into 5.1 tree (msvensson:1.2444)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson 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, 2007-02-20 16:19:42+01:00, msvensson@stripped +3 -0
  Merge pilot.blaudden:/home/msvensson/mysql/bug20166/my50-bug20166
  into  pilot.blaudden:/home/msvensson/mysql/bug20166/my51-bug20166
  MERGE: 1.1810.2372.104

  sql/log.cc@stripped, 2007-02-20 16:19:40+01:00, msvensson@stripped +1 -2
    Manual merge, 5.1 version had spaces between variables
    MERGE: 1.158.16.1

  sql/mysqld.cc@stripped, 2007-02-20 16:19:40+01:00, msvensson@stripped +0 -1
    Code no longer exists
    MERGE: 1.439.82.17

  sql/set_var.cc@stripped, 2007-02-20 16:19:40+01:00, msvensson@stripped +0 -1
    Manual merge
    MERGE: 1.125.22.4

# 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:	msvensson
# Host:	pilot.blaudden
# Root:	/home/msvensson/mysql/bug20166/my51-bug20166/RESYNC

--- 1.255/sql/log.cc	2007-01-29 00:47:30 +01:00
+++ 1.256/sql/log.cc	2007-02-20 16:19:40 +01:00
@@ -2297,7 +2297,7 @@
       TODO: The following should be using fn_format();  We just need to
       first change fn_format() to cut the file name if it's too long.
     */
-    strmake(buff, glob_hostname, FN_REFLEN - 5);
+    strmake(buff, pidfile_name, FN_REFLEN - 5);
     strmov(fn_ext(buff), suffix);
     return (const char *)buff;
   }

--- 1.619/sql/mysqld.cc	2007-02-14 14:51:46 +01:00
+++ 1.620/sql/mysqld.cc	2007-02-20 16:19:40 +01:00
@@ -2677,9 +2677,15 @@
   */
   mysql_bin_log.init_pthread_objects();
 
-  if (gethostname(glob_hostname,sizeof(glob_hostname)-4) < 0)
-    strmov(glob_hostname,"mysql");
-  strmake(pidfile_name, glob_hostname, sizeof(pidfile_name)-5);
+  if (gethostname(glob_hostname,sizeof(glob_hostname)) < 0)
+  {
+    strmake(glob_hostname, STRING_WITH_LEN("localhost"));
+    sql_print_warning("gethostname failed, using '%s' as hostname",
+                      glob_hostname);
+    strmake(pidfile_name, STRING_WITH_LEN("mysql"));
+  }
+  else
+    strmake(pidfile_name, glob_hostname, sizeof(pidfile_name)-5);
   strmov(fn_ext(pidfile_name),".pid");		// Add proper extension
 
   /*

--- 1.216/sql/set_var.cc	2007-02-14 14:51:46 +01:00
+++ 1.217/sql/set_var.cc	2007-02-20 16:19:40 +01:00
@@ -655,6 +655,10 @@
 
 /* Read only variables */
 
+/* Global read-only variable containing hostname */
+sys_var_const_str		sys_hostname("hostname", glob_hostname);
+
+
 sys_var_have_variable sys_have_compress("have_compress", &have_compress);
 sys_var_have_variable sys_have_crypt("have_crypt", &have_crypt);
 sys_var_have_variable sys_have_csv_db("have_csv", &have_csv_db);
@@ -779,6 +783,7 @@
   {sys_var_general_log.name, (char*) &opt_log,                      SHOW_MY_BOOL},
   {sys_var_general_log_path.name, (char*) &sys_var_general_log_path,  SHOW_SYS},
   {sys_group_concat_max_len.name, (char*) &sys_group_concat_max_len,  SHOW_SYS},
+  {sys_hostname.name,         (char*) &sys_hostname,                SHOW_SYS},
   {sys_have_compress.name,    (char*) &have_compress,               SHOW_HAVE},
   {sys_have_crypt.name,       (char*) &have_crypt,                  SHOW_HAVE},
   {sys_have_csv_db.name,      (char*) &have_csv_db,                 SHOW_HAVE},
Thread
bk commit into 5.1 tree (msvensson:1.2444)msvensson20 Feb