Commit 8b44be63 authored by unknown's avatar unknown

item_cmpfunc.h:

  COND_EQUAL must be derived from Sql_alloc to simplify memory
  management for objects of this class.
  This fixes a leak in mysql-test-run noticed by PEM.
opt_range.cc:
  Fixed uninitialized min_max_range member the QUICK_GROUP_MIN_MAX_SELECT class.


sql/opt_range.cc:
  Fixed uninitialized min_max_range member the QUICK_GROUP_MIN_MAX_SELECT class.
sql/item_cmpfunc.h:
  COND_EQUAL must be derived from Sql_alloc to simplify memory
  management for objects of this class.
  This fixes a leak in mysql-test-run noticed by PEM.
parent 4c06b4ae
...@@ -1081,7 +1081,7 @@ class Item_equal: public Item_bool_func ...@@ -1081,7 +1081,7 @@ class Item_equal: public Item_bool_func
{ return fields.head()->collation.collation; } { return fields.head()->collation.collation; }
}; };
class COND_EQUAL class COND_EQUAL: public Sql_alloc
{ {
public: public:
uint max_members; /* max number of members the current level uint max_members; /* max number of members the current level
......
...@@ -7564,6 +7564,8 @@ int QUICK_GROUP_MIN_MAX_SELECT::init() ...@@ -7564,6 +7564,8 @@ int QUICK_GROUP_MIN_MAX_SELECT::init()
else else
max_functions_it= NULL; max_functions_it= NULL;
} }
else
min_max_ranges.elements= 0;
return 0; return 0;
} }
...@@ -7656,7 +7658,7 @@ void QUICK_GROUP_MIN_MAX_SELECT::update_key_stat() ...@@ -7656,7 +7658,7 @@ void QUICK_GROUP_MIN_MAX_SELECT::update_key_stat()
max_used_key_length= real_prefix_len; max_used_key_length= real_prefix_len;
if (min_max_ranges.elements > 0) if (min_max_ranges.elements > 0)
{ {
QUICK_RANGE *cur_range; QUICK_RANGE *cur_range= 0;
if (have_min) if (have_min)
{ /* Check if the right-most range has a lower boundary. */ { /* Check if the right-most range has a lower boundary. */
get_dynamic(&min_max_ranges, (gptr)&cur_range, get_dynamic(&min_max_ranges, (gptr)&cur_range,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment