List:Internals« Previous MessageNext Message »
From:monty Date:July 1 2005 8:40am
Subject:bk commit into 4.1 tree (monty:1.2325)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of monty. When monty 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.2325 05/07/01 09:40:05 monty@stripped +1 -0
  Optimization during review
  Add extra check to delete [] to ensure we are not deleting not allocated data

  sql/sql_select.cc
    1.417 05/07/01 09:40:01 monty@stripped +4 -5
    Optimization
    Add extra check to delete [] to ensure we are not deleting not allocated data

# 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:	monty
# Host:	narttu.mysql.com
# Root:	/home/my/mysql-4.1

--- 1.416/sql/sql_select.cc	2005-06-28 13:23:59 +03:00
+++ 1.417/sql/sql_select.cc	2005-07-01 09:40:01 +03:00
@@ -8222,12 +8222,10 @@
   thd->count_cuted_fields= CHECK_FIELD_IGNORE;
   for (store_key **copy=ref->key_copy ; *copy ; copy++)
   {
-    int res;
-    if ((res= (*copy)->copy()))
+    if ((*copy)->copy() & 1)
     {
       thd->count_cuted_fields= save_count_cuted_fields;
-      if ((res= res & 1))
-        return res;                               // Something went wrong
+      return 1;                                 // Something went wrong
     }
   }
   thd->count_cuted_fields= save_count_cuted_fields;
@@ -8818,7 +8816,8 @@
   DBUG_RETURN(0);
 
  err:
-  delete [] param->copy_field;			// This is never 0
+  if (copy)
+    delete [] param->copy_field;
   param->copy_field=0;
 err2:
   DBUG_RETURN(TRUE);
Thread
bk commit into 4.1 tree (monty:1.2325)monty1 Jul