List:Internals« Previous MessageNext Message »
From:Georg Richter Date:June 15 2005 1:59pm
Subject:bk commit into 5.0 tree (georg:1.1940)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of georg. When georg 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.1940 05/06/15 15:58:56 georg@stripped +3 -0
  Merge grichter@stripped:/home/bk/mysql-5.0
  into lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-5.0

  sql/item_cmpfunc.cc
    1.156 05/06/15 15:58:54 georg@stripped +0 -0
    Auto merged

  sql/item.h
    1.138 05/06/15 15:58:54 georg@stripped +0 -0
    Auto merged

  sql/item.cc
    1.136 05/06/15 15:58:52 georg@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:	georg
# Host:	lmy002.wdf.sap.corp
# Root:	/home/georg/work/mysql/prod/mysql-5.0/RESYNC

--- 1.135/sql/item.cc	2005-06-13 12:41:07 +02:00
+++ 1.136/sql/item.cc	2005-06-15 15:58:52 +02:00
@@ -4443,6 +4443,7 @@
 				    struct st_table_list *table_list,
 				    Item **items)
 {
+  Item *real_arg;
   Item_field *field_arg;
   Field *def_field;
   DBUG_ASSERT(fixed == 0);
@@ -4454,17 +4455,15 @@
   }
   if (!arg->fixed && arg->fix_fields(thd, table_list, &arg))
     return TRUE;
-  
-  if (arg->type() == REF_ITEM)
+
+  real_arg= arg->real_item();
+  if (real_arg->type() != FIELD_ITEM)
   {
-    Item_ref *ref= (Item_ref *)arg;
-    if (ref->ref[0]->type() != FIELD_ITEM)
-    {
-      return TRUE;
-    }
-    arg= ref->ref[0];
+    my_error(ER_NO_DEFAULT_FOR_FIELD, MYF(0), arg->name);
+    return TRUE;
   }
-  field_arg= (Item_field *)arg;
+
+  field_arg= (Item_field *)real_arg;
   if (field_arg->field->flags & NO_DEFAULT_VALUE_FLAG)
   {
     my_error(ER_NO_DEFAULT_FOR_FIELD, MYF(0), field_arg->field->field_name);

--- 1.137/sql/item.h	2005-06-13 12:41:07 +02:00
+++ 1.138/sql/item.h	2005-06-15 15:58:54 +02:00
@@ -1352,7 +1352,10 @@
   {
     (*ref)->save_in_field(result_field, no_conversions);
   }
-  Item *real_item() { return *ref; }
+  Item *real_item()
+  {
+    return (*ref)->real_item();
+  }
   bool walk(Item_processor processor, byte *arg)
   { return (*ref)->walk(processor, arg); }
   void print(String *str);

--- 1.155/sql/item_cmpfunc.cc	2005-06-13 12:41:07 +02:00
+++ 1.156/sql/item_cmpfunc.cc	2005-06-15 15:58:54 +02:00
@@ -1406,9 +1406,7 @@
 bool
 Item_func_nullif::is_null()
 {
-  if (!cmp.compare())
-    return (null_value=1);
-  return 0;
+  return (null_value= (!cmp.compare() ? 1 : args[0]->null_value)); 
 }
 
 /*
Thread
bk commit into 5.0 tree (georg:1.1940)Georg Richter15 Jun