List:Commits« Previous MessageNext Message »
From:Mattias Jonsson Date:June 14 2011 9:50am
Subject:bzr commit into mysql-trunk branch (mattias.jonsson:3195) Bug#12589828
View as plain text  
#At file:///C:/ade/mysql-bzr/b12589828-trunk/ based on revid:mattias.jonsson@stripped

 3195 Mattias Jonsson	2011-06-14
      Bug#12589828:MEMORY LEAKS IN PARTITIONING TESTS ON TRUNK
      
      Moved from non-safe c_ptr_safe() to c_ptr() + using lenght() instead,
      to avoid mem leak.
      No test needed, valgrind_report failed for main.partition_explicit_prune.

    modified:
      sql/partition_info.cc
=== modified file 'sql/partition_info.cc'
--- a/sql/partition_info.cc	2011-05-26 15:20:09 +0000
+++ b/sql/partition_info.cc	2011-06-14 09:50:33 +0000
@@ -115,11 +115,11 @@ bool partition_info::prune_partition_bit
   do
   {
     String *part_name_str= partition_names_it++;
-    const char *part_name= part_name_str->c_ptr_safe();
+    const char *part_name= part_name_str->c_ptr();
     PART_NAME_DEF *part_def;
     part_def= (PART_NAME_DEF*) my_hash_search(part_name_hash,
                                               (const uchar*) part_name,
-                                              strlen(part_name));
+                                              part_name_str->length());
     if (!part_def)
     {
       my_error(ER_NO_SUCH_PARTITION, MYF(0), part_name);


Attachment: [text/bzr-bundle] bzr/mattias.jonsson@oracle.com-20110614095033-48ri7wk1zyv0uieg.bundle
Thread
bzr commit into mysql-trunk branch (mattias.jonsson:3195) Bug#12589828Mattias Jonsson14 Jun
  • Re: bzr commit into mysql-trunk branch (mattias.jonsson:3195) Bug#12589828Tor Didriksen14 Jun