summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorunknown <bar@bar.mysql.r18.ru>2003-07-16 11:29:16 +0500
committerunknown <bar@bar.mysql.r18.ru>2003-07-16 11:29:16 +0500
commita41a43f99d053b96821d0c7388126ca581146933 (patch)
tree96c3e55c00f579733c300a701e2e951e7520885a /sql/item_cmpfunc.h
parent6b52f58255dd67a91d7cd0afa45f69607f498d0a (diff)
downloadmariadb-git-a41a43f99d053b96821d0c7388126ca581146933.tar.gz
Item_func_null doesn't have a separate Item for the first argument anymore.
args[0] is used instead. This allowed to resuse a lot of code.
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h26
1 files changed, 5 insertions, 21 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 8309cd25a72..9de222aafaf 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -600,42 +600,26 @@ public:
class Item_func_in :public Item_int_func
{
- Item *item;
in_vector *array;
cmp_item *in_item;
bool have_null;
DTCollation cmp_collation;
public:
- Item_func_in(Item *a,List<Item> &list)
- :Item_int_func(list), item(a), array(0), in_item(0), have_null(0)
+ Item_func_in(List<Item> &list)
+ :Item_int_func(list), array(0), in_item(0), have_null(0)
{
- allowed_arg_cols= item->cols();
+ allowed_arg_cols= args[0]->cols();
}
longlong val_int();
- bool fix_fields(THD *thd, struct st_table_list *tlist, Item **ref)
- {
- // We do not check item->cols(), because allowed_arg_cols assigned from it
- bool res=(item->fix_fields(thd, tlist, &item) ||
- Item_func::fix_fields(thd, tlist, ref));
- with_sum_func= with_sum_func || item->with_sum_func;
- return res;
- }
void fix_length_and_dec();
- ~Item_func_in() { delete item; delete array; delete in_item; }
+ ~Item_func_in() { delete array; delete in_item; }
optimize_type select_optimize() const
{ return array ? OPTIMIZE_KEY : OPTIMIZE_NONE; }
- Item *key_item() const { return item; }
+ Item *key_item() const { return args[0]; }
void print(String *str);
enum Functype functype() const { return IN_FUNC; }
const char *func_name() const { return " IN "; }
- void update_used_tables();
- void split_sum_func(Item **ref_pointer_array, List<Item> &fields);
bool nulls_in_row();
- void set_outer_resolving()
- {
- item->set_outer_resolving();
- Item_int_func::set_outer_resolving();
- }
};
/* Functions used by where clause */