List:Commits« Previous MessageNext Message »
From:sergeyv Date:January 30 2006 2:03pm
Subject:bk commit into 5.0 tree (SergeyV:1.2015)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of sergeyv. When sergeyv 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.2015 06/01/30 17:03:09 SergeyV@selena. +1 -0
  Merge svlasenko@stripped:/home/bk/mysql-5.0
  into  selena.:H:/MYSQL/src/#15634-mysql-5.0

  sql/field.cc
    1.297 06/01/30 17:02:51 SergeyV@selena. +0 -0
    Auto merged


# 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:	SergeyV
# Host:	selena.
# Root:	H:/MYSQL/src/#15634-mysql-5.0/RESYNC

--- 1.296/sql/field.cc	2005-12-28 19:40:12 +03:00
+++ 1.297/sql/field.cc	2006-01-30 17:02:51 +03:00
@@ -1570,7 +1570,6 @@
 bool Field::quote_data(String *unquoted_string)
 {
   char escaped_string[IO_SIZE];
-  char *unquoted_string_buffer= (char *)(unquoted_string->ptr());
   DBUG_ENTER("Field::quote_data");
 
   if (!needs_quotes())
@@ -4541,8 +4540,6 @@
       error= 1;
     }
   }
-  if (error > 1)
-    error= 2;
 
 #ifdef WORDS_BIGENDIAN
   if (table->s->db_low_byte_first)
@@ -5879,7 +5876,7 @@
                                                     field_length/
                                                     field_charset->mbmaxlen,
                                                     &well_formed_error);
-  memcpy(ptr,from,copy_length);
+  memmove(ptr, from, copy_length);
 
   /* Append spaces if the string was shorter than the field. */
   if (copy_length < field_length)
@@ -6215,8 +6212,8 @@
     This is done to ensure that ALTER TABLE will convert old VARCHAR fields
     to now VARCHAR fields.
   */
-  if (new_field= new Field_varstring(field_length, maybe_null(),
-                                     field_name, new_table, charset()))
+  if ((new_field= new Field_varstring(field_length, maybe_null(),
+                                      field_name, new_table, charset())))
   {
     /*
       delayed_insert::get_local_table() needs a ptr copied from old table.
@@ -6272,7 +6269,7 @@
 						    field_length/
 						    field_charset->mbmaxlen,
                                                     &well_formed_error);
-  memcpy(ptr + length_bytes, from, copy_length);
+  memmove(ptr + length_bytes, from, copy_length);
   if (length_bytes == 1)
     *ptr= (uchar) copy_length;
   else
@@ -7070,7 +7067,7 @@
     }
     get_ptr(&blob);
     gobj= Geometry::construct(&buffer, blob, blob_length);
-    if (gobj->get_mbr(&mbr, &dummy))
+    if (!gobj || gobj->get_mbr(&mbr, &dummy))
       bzero(buff, SIZEOF_STORED_DOUBLE*4);
     else
     {
@@ -7399,7 +7396,7 @@
   }
   get_ptr(&blob);
   gobj= Geometry::construct(&buffer, blob, blob_length);
-  if (gobj->get_mbr(&mbr, &dummy))
+  if (!gobj || gobj->get_mbr(&mbr, &dummy))
     bzero(buff, SIZEOF_STORED_DOUBLE*4);
   else
   {
@@ -8157,17 +8154,14 @@
 */
 
 Field_bit_as_char::Field_bit_as_char(char *ptr_arg, uint32 len_arg,
-                                     uchar *null_ptr_arg, uchar null_bit_arg, 
-                                     uchar *bit_ptr_arg, uchar bit_ofs_arg, 
-                                     enum utype unireg_check_arg, 
+                                     uchar *null_ptr_arg, uchar null_bit_arg,
+                                     enum utype unireg_check_arg,
                                      const char *field_name_arg,
                                      struct st_table *table_arg)
-  : Field_bit(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, bit_ptr_arg,
-              bit_ofs_arg, unireg_check_arg, field_name_arg, table_arg),
+  : Field_bit(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, 0,
+              0, unireg_check_arg, field_name_arg, table_arg),
     create_length(len_arg)
 {
-  bit_ptr= 0;
-  bit_ofs= 0;
   bit_len= 0;
   field_length= ((len_arg + 7) & ~7) / 8;
 }
@@ -8868,8 +8862,8 @@
     return new Field_null(ptr,field_length,unireg_check,field_name,table, field_charset);
   case FIELD_TYPE_BIT:
     return f_bit_as_char(pack_flag) ?
-           new Field_bit_as_char(ptr, field_length, null_pos, null_bit, bit_ptr,
-                                 bit_offset, unireg_check, field_name, table) :
+           new Field_bit_as_char(ptr, field_length, null_pos, null_bit,
+                                 unireg_check, field_name, table) :
            new Field_bit(ptr, field_length, null_pos, null_bit, bit_ptr,
                          bit_offset, unireg_check, field_name, table);
   default:					// Impossible (Wrong version)
@@ -8984,11 +8978,11 @@
   switch (packlength)
   {
   case 1:
-    return 255;
+    return 255 * field_charset->mbmaxlen;
   case 2:
-    return 65535;
+    return 65535 * field_charset->mbmaxlen;
   case 3:
-    return 16777215;
+    return 16777215 * field_charset->mbmaxlen;
   case 4:
     return (uint32) 4294967295U;
   default:
Thread
bk commit into 5.0 tree (SergeyV:1.2015)sergeyv30 Jan