Commit 44b9faab authored by igor@rurik.mysql.com's avatar igor@rurik.mysql.com

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.
parent 4970bdab
......@@ -1081,7 +1081,7 @@ public:
{ return fields.head()->collation.collation; }
};
class COND_EQUAL
class COND_EQUAL: public Sql_alloc
{
public:
uint max_members; /* max number of members the current level
......
......@@ -7564,6 +7564,8 @@ int QUICK_GROUP_MIN_MAX_SELECT::init()
else
max_functions_it= NULL;
}
else
min_max_ranges.elements= 0;
return 0;
}
......@@ -7656,7 +7658,7 @@ void QUICK_GROUP_MIN_MAX_SELECT::update_key_stat()
max_used_key_length= real_prefix_len;
if (min_max_ranges.elements > 0)
{
QUICK_RANGE *cur_range;
QUICK_RANGE *cur_range= 0;
if (have_min)
{ /* Check if the right-most range has a lower boundary. */
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