summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorserg@serg.mylan <>2006-01-03 18:12:03 +0100
committerserg@serg.mylan <>2006-01-03 18:12:03 +0100
commit30c09d6dc09adcd8aac8769af49402e1812d6455 (patch)
treecfc5357eb7d1e59ea0163aa88d31bcf7644151d7 /sql/opt_range.cc
parent8ce6f3e6ca7fedd2142e784e9aeab72ec2e49951 (diff)
parent14f94dc0cad1419e74047956c059c1cf9c3e7a2c (diff)
downloadmariadb-git-30c09d6dc09adcd8aac8769af49402e1812d6455.tar.gz
merged
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 221a343053d..515e9723f1d 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -652,7 +652,6 @@ SQL_SELECT *make_select(TABLE *head, table_map const_tables,
table_map read_tables, COND *conds,
bool allow_null_cond,
int *error)
-
{
SQL_SELECT *select;
DBUG_ENTER("make_select");
@@ -5775,10 +5774,7 @@ QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table,
if (!quick)
return 0; /* no ranges found */
if (quick->init())
- {
- delete quick;
goto err;
- }
quick->records= records;
if (cp_buffer_from_ref(thd,ref) && thd->is_fatal_error ||
@@ -7112,7 +7108,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree)
ha_rows cur_records;
SEL_ARG *cur_index_tree= NULL;
ha_rows cur_quick_prefix_records= 0;
- uint cur_param_idx;
+ uint cur_param_idx=MAX_KEY;
key_map cur_used_key_parts;
uint pk= param->table->s->primary_key;
@@ -7328,6 +7324,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree)
*/
if (cur_read_cost < best_read_cost - (DBL_EPSILON * cur_read_cost))
{
+ DBUG_ASSERT(tree != 0 || cur_param_idx == MAX_KEY);
index_info= cur_index_info;
index= cur_index;
best_read_cost= cur_read_cost;