summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index fc3ce09dd8e..7a6685914a9 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -578,7 +578,7 @@ bool simple_pred(Item_func *func_item, Item **args, bool *inv_order)
if (!item->const_item())
return 0;
args[i]= item;
- if (check_item1_shorter_item2(args[0], args[1]))
+ if (check_item1_shorter_item2(args[0], args[i]))
return 0;
}
}