summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-07-22 11:20:02 +0300
committerunknown <bell@sanja.is.com.ua>2003-07-22 11:20:02 +0300
commit54396ee8309cc6b394e717e6bce2826ee9f09397 (patch)
treee83a1d1df5eab92a9e4e46ba5a8d2f6be4fc14cc /sql/item_cmpfunc.h
parented8be699fea316ecd9ee49c0739c54c0e51c73da (diff)
parentca6c74b7ee8f9a1a94521083215601ef635f1db3 (diff)
downloadmariadb-git-54396ee8309cc6b394e717e6bce2826ee9f09397.tar.gz
Merge sanja.is.com.ua:/home/bell/mysql/bk/work-top3-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-simple_in-4.1 sql/item_cmpfunc.h: Auto merged sql/item_func.h: Auto merged sql/sql_select.h: Auto merged
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h29
1 files changed, 20 insertions, 9 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index d0748269c77..44e1cf99511 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -347,28 +347,38 @@ public:
class Item_func_case :public Item_func
{
- Item * first_expr, *else_expr;
+ int first_expr_num, else_expr_num;
enum Item_result cached_result_type;
String tmp_value;
- bool first_expr_is_binary;
+ uint ncases;
+ Item_result cmp_type;
+ DTCollation cmp_collation;
public:
Item_func_case(List<Item> &list, Item *first_expr_arg, Item *else_expr_arg)
- :Item_func(list), first_expr(first_expr_arg), else_expr(else_expr_arg),
+ :Item_func(), first_expr_num(-1), else_expr_num(-1),
cached_result_type(INT_RESULT)
- {}
+ {
+ ncases= list.elements;
+ if (first_expr_arg)
+ {
+ first_expr_num= list.elements;
+ list.push_back(first_expr_arg);
+ }
+ if (else_expr_arg)
+ {
+ else_expr_num= list.elements;
+ list.push_back(else_expr_arg);
+ }
+ set_arguments(list);
+ }
double val();
longlong val_int();
String *val_str(String *);
void fix_length_and_dec();
- void update_used_tables();
enum Item_result result_type () const { return cached_result_type; }
const char *func_name() const { return "case"; }
void print(String *str);
- bool fix_fields(THD *thd, struct st_table_list *tlist, Item **ref);
- void split_sum_func(Item **ref_pointer_array, List<Item> &fields);
Item *find_item(String *str);
-
- bool walk(Item_processor processor, byte *args);
};
@@ -600,6 +610,7 @@ public:
class Item_func_in :public Item_int_func
{
+ Item_result cmp_type;
in_vector *array;
cmp_item *in_item;
bool have_null;