List:Internals« Previous MessageNext Message »
From:Petr Chardin Date:September 8 2005 4:27pm
Subject:bk commit into 5.0 tree (petr:1.1961)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of pchardin. When pchardin 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.1961 05/09/08 18:27:05 petr@stripped +1 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.0
  into mysql.com:/usersnfs/pchardin/mysql-5.0

  sql/sp_head.cc
    1.181 05/09/08 18:27:03 petr@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:	petr
# Host:	production.mysql.com
# Root:	/usersnfs/pchardin/mysql-5.0/RESYNC

--- 1.180/sql/sp_head.cc	2005-09-08 15:53:09 +02:00
+++ 1.181/sql/sp_head.cc	2005-09-08 18:27:03 +02:00
@@ -275,8 +275,19 @@
     }
     DBUG_PRINT("info",("STRING_RESULT: %*s",
                        s->length(), s->c_ptr_quick()));
-    CHARSET_INFO *itcs= it->collation.collation;
-    CREATE_ON_CALLERS_ARENA(it= new(reuse, &rsize) Item_string(itcs),
+    /*
+      Reuse mechanism in sp_eval_func_item() is only employed for assignments
+      to local variables and OUT/INOUT SP parameters repsesented by
+      Item_splocal. Usually we have some expression, which needs
+      to be calculated and stored into the local variable. However in the
+      case if "it" equals to "reuse", there is no "calculation" step. So,
+      no reason to employ reuse mechanism to save variable into itself.
+    */
+    if (it == reuse)
+      DBUG_RETURN(it);
+
+    CREATE_ON_CALLERS_ARENA(it= new(reuse, &rsize)
+                            Item_string(it->collation.collation),
                             use_callers_arena, &backup_arena);
     /*
       We have to use special constructor and allocate string
Thread
bk commit into 5.0 tree (petr:1.1961)Petr Chardin8 Sep