List:Commits« Previous MessageNext Message »
From:ramil Date:June 5 2006 4:05am
Subject:bk commit into 5.1 tree (ramil:1.2183)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of ram. When ram 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.2183 06/06/05 09:05:12 ramil@stripped +2 -0
  Merge rkalimullin@stripped:/home/bk/mysql-5.1-new
  into  mysql.com:/usr/home/ram/work/5.1.b18014

  sql/field.h
    1.184 06/06/05 09:05:01 ramil@stripped +0 -0
    Auto merged

  sql/field.cc
    1.307 06/06/05 09:05:01 ramil@stripped +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:	ramil
# Host:	myoffice.izhnet.ru
# Root:	/usr/home/ram/work/5.1.b18014/RESYNC

--- 1.306/sql/field.cc	2006-05-26 09:02:30 +05:00
+++ 1.307/sql/field.cc	2006-06-05 09:05:01 +05:00
@@ -1218,12 +1218,12 @@ String *Field::val_int_as_str(String *va
 Field::Field(char *ptr_arg,uint32 length_arg,uchar *null_ptr_arg,
 	     uchar null_bit_arg,
 	     utype unireg_check_arg, const char *field_name_arg)
-  :ptr(ptr_arg),null_ptr(null_ptr_arg),
+  :ptr(ptr_arg), null_ptr(null_ptr_arg),
    table(0), orig_table(0), table_name(0),
    field_name(field_name_arg),
    query_id(0), key_start(0), part_of_key(0), part_of_sortkey(0),
    unireg_check(unireg_check_arg),
-   field_length(length_arg), null_bit(null_bit_arg), dflt_field(0)
+   field_length(length_arg), null_bit(null_bit_arg)
 {
   flags=null_ptr ? 0: NOT_NULL_FLAG;
   comment.str= (char*) "";
@@ -9071,14 +9071,15 @@ create_field::create_field(Field *old_fi
     diff= (my_ptrdiff_t) (orig_field->table->s->default_values-
                           orig_field->table->record[0]);
     orig_field->move_field_offset(diff);	// Points now at default_values
-    is_null= orig_field->is_real_null();
-    res= orig_field->val_str(&tmp);
-    orig_field->move_field_offset(-diff);	// Back to record[0]
-    if (!is_null)
+    if (!orig_field->is_real_null())
     {
+      char buff[MAX_FIELD_WIDTH], *pos;
+      String tmp(buff, sizeof(buff), charset), *res;
+      res= orig_field->val_str(&tmp);
       pos= (char*) sql_strmake(res->ptr(), res->length());
       def= new Item_string(pos, res->length(), charset);
     }
+    orig_field->move_field_offset(-diff);	// Back to record[0]
   }
 }
 

--- 1.183/sql/field.h	2006-05-26 09:02:30 +05:00
+++ 1.184/sql/field.h	2006-06-05 09:05:01 +05:00
@@ -55,12 +55,6 @@ public:
   char		*ptr;			// Position to field in record
   uchar		*null_ptr;		// Byte where null_bit is
   /*
-    dflt_field is used only for the fields of temporary tables.
-    It points to the default value of the field in another table
-    from which this field has been created.
-  */ 
-  Field         *dflt_field;            // Field to copy default value from
-  /*
     Note that you can use table->in_use as replacement for current_thd member 
     only inside of val_*() and store() members (e.g. you can't use it in cons)
   */
Thread
bk commit into 5.1 tree (ramil:1.2183)ramil5 Jun