summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2015-07-10 09:18:17 +0300
committerMonty <monty@mariadb.org>2015-07-10 09:18:17 +0300
commit24881437b7e0e50027361a0462126cd1ba0a5061 (patch)
tree934bf1399a4e7d8b8ba94793303567db1016d1f0 /sql/opt_sum.cc
parent9bb8b74e99adced1ccb38ced24a96cf2d1040f39 (diff)
downloadmariadb-git-24881437b7e0e50027361a0462126cd1ba0a5061.tar.gz
Fixed bug found by bar where we didn't properely check length of last argument for BETWEEN
This should not have caused any notable errors in most cases. After fix, we are not using keys to solve MIN/MAX if the string used for comparision is longer thant the column-
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;
}
}