List:Commits« Previous MessageNext Message »
From:msvensson Date:April 23 2007 4:22pm
Subject:bk commit into 5.0 tree (msvensson:1.2449)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 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-04-23 16:22:01+02:00, msvensson@stripped +4 -0
  Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0
  into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
  MERGE: 1.2433.1.4

  client/mysql.cc@stripped, 2007-04-23 16:21:59+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.236.1.1

  sql/item_cmpfunc.cc@stripped, 2007-04-23 16:21:59+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.245.1.1

  sql/mysql_priv.h@stripped, 2007-04-23 16:21:59+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.444.1.1

  sql/mysqld.cc@stripped, 2007-04-23 16:21:59+02:00, msvensson@stripped +0 -0
    Auto merged
    MERGE: 1.604.1.1

# 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/mysql-5.0-maint/RESYNC

--- 1.237/client/mysql.cc	2007-04-19 08:45:22 +02:00
+++ 1.238/client/mysql.cc	2007-04-23 16:21:59 +02:00
@@ -2117,6 +2117,17 @@ com_go(String *buffer,char *line __attri
       if (!mysql_num_rows(result) && ! quick && !info_flag)
       {
 	strmov(buff, "Empty set");
+        if (opt_xml)
+        { 
+          /*
+            We must print XML header and footer
+            to produce a well-formed XML even if
+            the result set is empty (Bug#27608).
+          */
+          init_pager();
+          print_table_data_xml(result);
+          end_pager();
+        }
       }
       else
       {

--- 1.246/sql/item_cmpfunc.cc	2007-04-19 09:06:35 +02:00
+++ 1.247/sql/item_cmpfunc.cc	2007-04-23 16:21:59 +02:00
@@ -812,8 +812,18 @@ int Arg_comparator::compare_row()
     if (owner->null_value)
     {
       // NULL was compared
-      if (owner->abort_on_null)
-        return -1; // We do not need correct NULL returning
+      switch (owner->functype()) {
+      case Item_func::NE_FUNC:
+        break; // NE never aborts on NULL even if abort_on_null is set
+      case Item_func::LT_FUNC:
+      case Item_func::LE_FUNC:
+      case Item_func::GT_FUNC:
+      case Item_func::GE_FUNC:
+        return -1; // <, <=, > and >= always fail on NULL
+      default: // EQ_FUNC
+        if (owner->abort_on_null)
+          return -1; // We do not need correct NULL returning
+      }
       was_null= 1;
       owner->null_value= 0;
       res= 0;  // continue comparison (maybe we will meet explicit difference)
@@ -824,8 +834,8 @@ int Arg_comparator::compare_row()
   if (was_null)
   {
     /*
-      There was NULL(s) in comparison in some parts, but there was not
-      explicit difference in other parts, so we have to return NULL
+      There was NULL(s) in comparison in some parts, but there was no
+      explicit difference in other parts, so we have to return NULL.
     */
     owner->null_value= 1;
     return -1;

--- 1.445/sql/mysql_priv.h	2007-04-20 10:35:21 +02:00
+++ 1.446/sql/mysql_priv.h	2007-04-23 16:21:59 +02:00
@@ -269,7 +269,6 @@ MY_LOCALE *my_locale_by_number(uint numb
 #endif
 
 #if defined(__WIN__) || defined(OS2)
-#define IF_WIN(A,B) (A)
 #undef	FLUSH_TIME
 #define FLUSH_TIME	1800			/* Flush every half hour */
 
@@ -278,7 +277,6 @@ MY_LOCALE *my_locale_by_number(uint numb
 #define WAIT_PRIOR	0
 #define QUERY_PRIOR	2
 #else
-#define IF_WIN(A,B) (B)
 #define INTERRUPT_PRIOR 10
 #define CONNECT_PRIOR	9
 #define WAIT_PRIOR	8

--- 1.605/sql/mysqld.cc	2007-04-18 22:50:23 +02:00
+++ 1.606/sql/mysqld.cc	2007-04-23 16:21:59 +02:00
@@ -315,6 +315,7 @@ static char *mysqld_user, *mysqld_chroot
 static char *opt_init_slave, *language_ptr, *opt_init_connect;
 static char *default_character_set_name;
 static char *character_set_filesystem_name;
+static char *lc_time_names_name;
 static char *my_bind_addr_str;
 static char *default_collation_name;
 static char compiled_default_collation_name[]= MYSQL_DEFAULT_COLLATION_NAME;
@@ -495,6 +496,8 @@ CHARSET_INFO *system_charset_info, *file
 CHARSET_INFO *national_charset_info, *table_alias_charset;
 CHARSET_INFO *character_set_filesystem;
 
+MY_LOCALE *my_default_lc_time_names;
+
 SHOW_COMP_OPTION have_isam;
 SHOW_COMP_OPTION have_raid, have_ssl, have_symlink, have_query_cache;
 SHOW_COMP_OPTION have_geometry, have_rtree_keys, have_dlopen;
@@ -2826,6 +2829,14 @@ static int init_common_variables(const c
     return 1;
   global_system_variables.character_set_filesystem= character_set_filesystem;
 
+  if (!(my_default_lc_time_names=
+        my_locale_by_name(lc_time_names_name)))
+  {
+    sql_print_error("Unknown locale: '%s'", lc_time_names_name);
+    return 1;
+  }
+  global_system_variables.lc_time_names= my_default_lc_time_names;
+  
   sys_init_connect.value_length= 0;
   if ((sys_init_connect.value= opt_init_connect))
     sys_init_connect.value_length= strlen(opt_init_connect);
@@ -4750,6 +4761,7 @@ enum options_mysqld
   OPT_DEFAULT_COLLATION,
   OPT_CHARACTER_SET_CLIENT_HANDSHAKE,
   OPT_CHARACTER_SET_FILESYSTEM,
+  OPT_LC_TIME_NAMES,
   OPT_INIT_CONNECT,
   OPT_INIT_SLAVE,
   OPT_SECURE_AUTH,
@@ -5079,6 +5091,11 @@ Disable with --skip-innodb-doublewrite."
    "Client error messages in given language. May be given as a full path.",
    (gptr*) &language_ptr, (gptr*) &language_ptr, 0, GET_STR, REQUIRED_ARG,
    0, 0, 0, 0, 0, 0},
+  {"lc-time-names", OPT_LC_TIME_NAMES,
+   "Set the language used for the month names and the days of the week.",
+   (gptr*) &lc_time_names_name,
+   (gptr*) &lc_time_names_name,
+   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
   {"local-infile", OPT_LOCAL_INFILE,
    "Enable/disable LOAD DATA LOCAL INFILE (takes values 1|0).",
    (gptr*) &opt_local_infile,
@@ -6553,7 +6570,7 @@ static void mysql_init_variables(void)
   default_collation_name= compiled_default_collation_name;
   sys_charset_system.value= (char*) system_charset_info->csname;
   character_set_filesystem_name= (char*) "binary";
-
+  lc_time_names_name= (char*) "en_US";
 
   /* Set default values for some option variables */
   global_system_variables.table_type=   DB_TYPE_MYISAM;
Thread
bk commit into 5.0 tree (msvensson:1.2449)msvensson23 Apr