diff options
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index a4b4944eab6..683bf1bdc13 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -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, |