diff options
author | sergefp@mysql.com <> | 2005-01-12 08:15:46 +0300 |
---|---|---|
committer | sergefp@mysql.com <> | 2005-01-12 08:15:46 +0300 |
commit | ea8d861d2357524876b693175a00e6f77bc6d58c (patch) | |
tree | 96bce98f9f6f3c90ce707ec769eba383461a4354 /sql/opt_range.cc | |
parent | 28ee79a732d5b0ad8613a35f1adf2437fd8365c2 (diff) | |
download | mariadb-git-ea8d861d2357524876b693175a00e6f77bc6d58c.tar.gz |
Fix for use of unitialized variable errors: Manually delete
{min,max}_functions_it as it is not allocated on the pool.
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 0e46e39960e..cb275ef3f58 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -7664,7 +7664,8 @@ QUICK_GROUP_MIN_MAX_SELECT(TABLE *table, JOIN *join_arg, bool have_min_arg, group_prefix_len(group_prefix_len_arg), have_min(have_min_arg), have_max(have_max_arg), seen_first_key(FALSE), min_max_arg_part(min_max_arg_part_arg), key_infix(key_infix_arg), - key_infix_len(key_infix_len_arg) + key_infix_len(key_infix_len_arg), min_functions_it(NULL), + max_functions_it(NULL) { head= table; file= head->file; @@ -7773,16 +7774,12 @@ int QUICK_GROUP_MIN_MAX_SELECT::init() if (!(min_functions_it= new List_iterator<Item_sum>(*min_functions))) return 1; } - else - min_functions_it= NULL; if (have_max) { if (!(max_functions_it= new List_iterator<Item_sum>(*max_functions))) return 1; } - else - max_functions_it= NULL; } else min_max_ranges.elements= 0; @@ -7799,6 +7796,8 @@ QUICK_GROUP_MIN_MAX_SELECT::~QUICK_GROUP_MIN_MAX_SELECT() if (min_max_arg_part) delete_dynamic(&min_max_ranges); free_root(&alloc,MYF(0)); + delete min_functions_it; + delete max_functions_it; delete quick_prefix_select; DBUG_VOID_RETURN; } |