summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-03-20 19:49:38 +0200
committerunknown <gkodinov/kgeorge@magare.gmz>2007-03-20 19:49:38 +0200
commitbac27bb9f5c6586e1993e6fef6c513cd79dd2306 (patch)
tree563495cf458bd9a81b6885b7855f23c12fd43c68 /sql/opt_range.cc
parent3798a7d5008f8f569f779f096b7fc1e1cfac1031 (diff)
parent9c89dd654e90d85fefc2459711063b680ed10f24 (diff)
downloadmariadb-git-bac27bb9f5c6586e1993e6fef6c513cd79dd2306.tar.gz
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B24484-5.0 mysql-test/r/subselect3.result: Auto merged sql/item.h: Auto merged sql/item_sum.cc: Auto merged sql/opt_range.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 0e284850cbe..c1655f1bd54 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -7528,7 +7528,8 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree)
else
DBUG_RETURN(NULL);
- Item *expr= min_max_item->args[0]; /* The argument of MIN/MAX. */
+ /* The argument of MIN/MAX. */
+ Item *expr= min_max_item->args[0]->real_item();
if (expr->type() == Item::FIELD_ITEM) /* Is it an attribute? */
{
if (! min_max_arg_item)
@@ -7906,6 +7907,7 @@ check_group_min_max_predicates(COND *cond, Item_field *min_max_arg_item,
DBUG_ENTER("check_group_min_max_predicates");
DBUG_ASSERT(cond && min_max_arg_item);
+ cond= cond->real_item();
Item::Type cond_type= cond->type();
if (cond_type == Item::COND_ITEM) /* 'AND' or 'OR' */
{
@@ -7943,7 +7945,7 @@ check_group_min_max_predicates(COND *cond, Item_field *min_max_arg_item,
DBUG_PRINT("info", ("Analyzing: %s", pred->func_name()));
for (uint arg_idx= 0; arg_idx < pred->argument_count (); arg_idx++)
{
- cur_arg= arguments[arg_idx];
+ cur_arg= arguments[arg_idx]->real_item();
DBUG_PRINT("info", ("cur_arg: %s", cur_arg->full_name()));
if (cur_arg->type() == Item::FIELD_ITEM)
{