diff options
author | igor@rurik.mysql.com <> | 2004-10-19 16:07:10 -0700 |
---|---|---|
committer | igor@rurik.mysql.com <> | 2004-10-19 16:07:10 -0700 |
commit | a03e5ad8e4982e034c960f0a8d558c3b3f2c134a (patch) | |
tree | c4a004a87cda30de2a6a2e8f1edd255d89e8a247 /sql/opt_sum.cc | |
parent | 0b7f26d74da1ba31bd44c18b325af2ce96823c5b (diff) | |
parent | 4c8e3917186ad416effa97bce402b9bb55a9f7b5 (diff) | |
download | mariadb-git-a03e5ad8e4982e034c960f0a8d558c3b3f2c134a.tar.gz |
Merge for post-merge fixes for Item_equal patch.
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r-- | sql/opt_sum.cc | 15 |
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 } |