MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:tim Date:July 19 2006 11:40pm
Subject:bk commit into 5.0 tree (tsmith:1.2209)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of tim. When tim 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-07-19 17:40:06-06:00, tsmith@stripped +4 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.0
  into  siva.hindu.god:/usr/home/tim/m/bk/merge-4150
  MERGE: 1.2196.1.34

  client/mysql.cc@stripped, 2006-07-19 17:39:50-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.208.1.1

  sql/item_strfunc.cc@stripped, 2006-07-19 17:39:51-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.275.1.1

  sql/item_strfunc.h@stripped, 2006-07-19 17:39:51-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.109.1.1

  sql/sql_yacc.yy@stripped, 2006-07-19 17:39:52-06:00, tsmith@stripped +0 -0
    Auto merged
    MERGE: 1.474.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:	tsmith
# Host:	siva.hindu.god
# Root:	/usr/home/tim/m/bk/merge-4150/RESYNC

--- 1.209/client/mysql.cc	2006-07-19 17:40:25 -06:00
+++ 1.210/client/mysql.cc	2006-07-19 17:40:25 -06:00
@@ -3724,6 +3724,9 @@
       case 't':
 	processed_prompt.append('\t');
 	break;
+      case 'l':
+	processed_prompt.append(delimiter_str);
+	break;
       default:
 	processed_prompt.append(c);
       }

--- 1.276/sql/item_strfunc.cc	2006-07-19 17:40:25 -06:00
+++ 1.277/sql/item_strfunc.cc	2006-07-19 17:40:25 -06:00
@@ -752,44 +752,47 @@
 {
   DBUG_ASSERT(fixed == 1);
   String *res = args[0]->val_str(str);
-  char *ptr,*end;
+  char *ptr, *end, *tmp;
 
   if ((null_value=args[0]->null_value))
     return 0;
   /* An empty string is a special case as the string pointer may be null */
   if (!res->length())
     return &my_empty_string;
-  res=copy_if_not_alloced(str,res,res->length());
-  ptr = (char *) res->ptr();
-  end=ptr+res->length();
+  if (tmp_value.alloced_length() < res->length() &&
+      tmp_value.realloc(res->length()))
+  {
+    null_value= 1;
+    return 0;
+  }
+  tmp_value.length(res->length());
+  tmp_value.set_charset(res->charset());
+  ptr= (char *) res->ptr();
+  end= ptr + res->length();
+  tmp= (char *) tmp_value.ptr() + tmp_value.length();
 #ifdef USE_MB
   if (use_mb(res->charset()))
   {
-    String tmpstr;
-    tmpstr.copy(*res);
-    char *tmp = (char *) tmpstr.ptr() + tmpstr.length();
     register uint32 l;
     while (ptr < end)
     {
-      if ((l=my_ismbchar(res->charset(), ptr,end)))
-        tmp-=l, memcpy(tmp,ptr,l), ptr+=l;
+      if ((l= my_ismbchar(res->charset(),ptr,end)))
+      {
+        tmp-= l;
+        memcpy(tmp,ptr,l);
+        ptr+= l;
+      }
       else
-        *--tmp=*ptr++;
+        *--tmp= *ptr++;
     }
-    memcpy((char *) res->ptr(),(char *) tmpstr.ptr(), res->length());
   }
   else
 #endif /* USE_MB */
   {
-    char tmp;
     while (ptr < end)
-    {
-      tmp=*ptr;
-      *ptr++=*--end;
-      *end=tmp;
-    }
+      *--tmp= *ptr++;
   }
-  return res;
+  return &tmp_value;
 }
 
 

--- 1.110/sql/item_strfunc.h	2006-07-19 17:40:25 -06:00
+++ 1.111/sql/item_strfunc.h	2006-07-19 17:40:25 -06:00
@@ -804,7 +804,7 @@
   String buffer;
 public:
   Item_func_uncompress(Item *a): Item_str_func(a){}
-  void fix_length_and_dec(){max_length= MAX_BLOB_WIDTH;}
+  void fix_length_and_dec(){ maybe_null= 1; max_length= MAX_BLOB_WIDTH; }
   const char *func_name() const{return "uncompress";}
   String *val_str(String *) ZLIB_DEPENDED_FUNCTION
 };

--- 1.475/sql/sql_yacc.yy	2006-07-19 17:40:25 -06:00
+++ 1.476/sql/sql_yacc.yy	2006-07-19 17:40:25 -06:00
@@ -4060,8 +4060,8 @@
 	      YYABORT;
 	    if ($4.str)
             {
-	      $2->set_name($4.str, $4.length, system_charset_info);
               $2->is_autogenerated_name= FALSE;
+	      $2->set_name($4.str, $4.length, system_charset_info);
             }
 	    else if (!$2->name) {
 	      char *str = $1;
@@ -4936,8 +4936,8 @@
 	{
 	  if ($4.str)
           {
-	    $2->set_name($4.str, $4.length, system_charset_info);
             $2->is_autogenerated_name= FALSE;
+	    $2->set_name($4.str, $4.length, system_charset_info);
           }
 	  else
 	    $2->set_name($1, (uint) ($3 - $1), YYTHD->charset());
Thread
bk commit into 5.0 tree (tsmith:1.2209)tim20 Jul