diff options
author | unknown <igor@rurik.mysql.com> | 2004-10-09 10:34:13 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2004-10-09 10:34:13 -0700 |
commit | 881534fb80cc7a017d180734a21a10b3e46aecba (patch) | |
tree | 84324c7af32f54d423310e3a2ee3255f7f43749b /sql/opt_sum.cc | |
parent | 79f1eeb87ff8047d1d09578f41c604bf5e31f29b (diff) | |
parent | 75fec5bdc3e9e5f0a4018c7dbf6371f0b4c5d14f (diff) | |
download | mariadb-git-881534fb80cc7a017d180734a21a10b3e46aecba.tar.gz |
Merge for Item_equal.
BitKeeper/etc/ignore:
auto-union
mysql-test/r/bdb.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/heap_btree.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/user_var.result:
Auto merged
mysql-test/t/range.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_row.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sql_list.h:
Auto merged
mysql-test/r/func_test.result:
Post-automerge resolution of conflicts
mysql-test/r/index_merge.result:
Post-automerge resolution of conflicts
mysql-test/r/join_outer.result:
Post-automerge resolution of conflicts
mysql-test/r/range.result:
Post-automerge resolution of conflicts
mysql-test/r/subselect.result:
Post-automerge resolution of conflicts
sql/item.cc:
Post-automerge resolution of conflicts
sql/item.h:
Post-automerge resolution of conflicts
sql/item_cmpfunc.cc:
Post-automerge resolution of conflicts
sql/item_cmpfunc.h:
Post-automerge resolution of conflicts
sql/opt_range.cc:
Post-automerge resolution of conflicts
sql/sql_select.cc:
Post-automerge resolution of conflicts
sql/sql_select.h:
Post-automerge resolution of conflicts
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 314decb7041..a47f7eb4278 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -341,6 +341,18 @@ static 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 } |