List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:July 7 2009 12:27pm
Subject:bzr commit into mysql-5.1-bugteam branch (joro:3007) Bug#46003
View as plain text  
#At file:///home/kgeorge/mysql/work/fixvg-5.1-bugteam/ based on revid:v.narayanan@stripped

 3007 Georgi Kodinov	2009-07-07
      Bug #46003: Valgrind warning in JOIN::init()
      
      Don't do double initialization of JOIN::fields_list
      in JOIN::init().

    modified:
      sql/sql_select.h
=== modified file 'sql/sql_select.h'
--- a/sql/sql_select.h	2009-02-23 16:16:48 +0000
+++ b/sql/sql_select.h	2009-07-07 12:27:41 +0000
@@ -415,11 +415,12 @@ public:
        select_result *result_arg)
     :fields_list(fields_arg)
   {
-    init(thd_arg, fields_arg, select_options_arg, result_arg);
+    init_inner(thd_arg, fields_arg, select_options_arg, result_arg);
   }
 
-  void init(THD *thd_arg, List<Item> &fields_arg, ulonglong select_options_arg,
-       select_result *result_arg)
+private:  
+  void init_inner(THD *thd_arg, List<Item> &fields_arg, 
+                  ulonglong select_options_arg, select_result *result_arg)
   {
     join_tab= join_tab_save= 0;
     table= 0;
@@ -466,7 +467,6 @@ public:
     group_optimized_away= 0;
 
     all_fields= fields_arg;
-    fields_list= fields_arg;
     bzero((char*) &keyuse,sizeof(keyuse));
     tmp_table_param.init();
     tmp_table_param.end_write_records= HA_POS_ERROR;
@@ -474,6 +474,13 @@ public:
 
     no_const_tables= FALSE;
   }
+public:
+  void init(THD *thd_arg, List<Item> &fields_arg, 
+            ulonglong select_options_arg, select_result *result_arg)
+  {
+    fields_list= fields_arg;
+    init_inner(thd_arg, fields_arg, select_options_arg, result_arg);
+  }
 
   int prepare(Item ***rref_pointer_array, TABLE_LIST *tables, uint wind_num,
 	      COND *conds, uint og_num, ORDER *order, ORDER *group,


Attachment: [text/bzr-bundle] bzr/joro@sun.com-20090707122741-rz4wqpxx13dlst41.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (joro:3007) Bug#46003Georgi Kodinov7 Jul