← Back to team overview

maria-developers team mailing list archive

Rev 2758: Subquery optimizations: backport in file:///home/psergey/dev/maria-5.3-subqueries-r3/

 

At file:///home/psergey/dev/maria-5.3-subqueries-r3/

------------------------------------------------------------
revno: 2758
revision-id: psergey@xxxxxxxxxxxx-20100211120315-o1hpcxl5lkbrbl25
parent: psergey@xxxxxxxxxxxx-20100209203217-al1k9h50zrlphy5d
committer: Sergey Petrunya <psergey@xxxxxxxxxxxx>
branch nick: maria-5.3-subqueries-r3
timestamp: Thu 2010-02-11 15:03:15 +0300
message:
  Subquery optimizations: backport
  - Fix valgrind failure: do initialize Item::is_expensive_cache.
=== modified file 'sql/item.cc'
--- a/sql/item.cc	2010-02-08 13:10:19 +0000
+++ b/sql/item.cc	2010-02-11 12:03:15 +0000
@@ -373,8 +373,8 @@
 
 
 Item::Item():
-  rsize(0), name(0), orig_name(0), name_length(0), fixed(0),
-  is_autogenerated_name(TRUE),
+  is_expensive_cache(-1), rsize(0), name(0), orig_name(0), name_length(0),
+  fixed(0), is_autogenerated_name(TRUE),
   collation(&my_charset_bin, DERIVATION_COERCIBLE)
 {
   marker= 0;
@@ -410,6 +410,7 @@
   tables.
 */
 Item::Item(THD *thd, Item *item):
+  is_expensive_cache(-1),
   rsize(0),
   str_value(item->str_value),
   name(item->name),

=== modified file 'sql/item.h'
--- a/sql/item.h	2010-01-28 13:48:33 +0000
+++ b/sql/item.h	2010-02-11 12:03:15 +0000
@@ -513,6 +513,9 @@
 
   enum traverse_order { POSTFIX, PREFIX };
   
+  /* Cache of the result of is_expensive(). */
+  int8 is_expensive_cache;
+  
   /* Reuse size, only used by SP local variable assignment, otherwize 0 */
   uint rsize;
 
@@ -878,9 +881,6 @@
   static CHARSET_INFO *default_charset();
   virtual CHARSET_INFO *compare_collation() { return NULL; }
 
-  /* Cache of the result of is_expensive(). */
-  int8 is_expensive_cache;
-  
   virtual bool walk(Item_processor processor, bool walk_subquery, uchar *arg)
   {
     return (this->*processor)(arg);