summaryrefslogtreecommitdiff
path: root/sql/opt_sum.cc
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2004-10-19 16:07:10 -0700
committerunknown <igor@rurik.mysql.com>2004-10-19 16:07:10 -0700
commita3e71bdbf54163ca8823aabc1c5938e5f593aa32 (patch)
treec4a004a87cda30de2a6a2e8f1edd255d89e8a247 /sql/opt_sum.cc
parent24b608b23084f0576bd94066c887b4891d55233d (diff)
parent05933f13f7466a0057b0d5689300ded9101588f8 (diff)
downloadmariadb-git-a3e71bdbf54163ca8823aabc1c5938e5f593aa32.tar.gz
Merge for post-merge fixes for Item_equal patch.
BitKeeper/etc/ignore: auto-union mysql-test/r/range.result: Auto merged mysql-test/r/select.result: Auto merged mysql-test/t/range.test: Auto merged sql/item.cc: Auto merged sql/opt_range.cc: Auto merged sql/opt_sum.cc: Auto merged sql/sql_select.h: Auto merged sql/item.h: Manual merge sql/sql_select.cc: Manual merge
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r--sql/opt_sum.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index 2507b65111b..6b966c28b1a 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -341,6 +341,18 @@ bool simple_pred(Item_func *func_item, Item **args, bool *inv_order)
Item *item;
*inv_order= 0;
switch (func_item->argument_count()) {
+ case 0:
+ /* MULT_EQUAL_FUNC */
+ {
+ Item_equal *item_equal= (Item_equal *) func_item;
+ Item_equal_iterator it(*item_equal);
+ args[0]= it++;
+ if (it++)
+ return 0;
+ if (!(args[1]= item_equal->get_const()))
+ return 0;
+ }
+ break;
case 1:
/* field IS NULL */
item= func_item->arguments()[0];
@@ -481,6 +493,9 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo,
case Item_func::BETWEEN:
between= 1;
break;
+ case Item_func::MULT_EQUAL_FUNC:
+ eq_type= 1;
+ break;
default:
return 0; // Can't optimize function
}