summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-07-22 11:18:51 +0300
committerunknown <bell@sanja.is.com.ua>2003-07-22 11:18:51 +0300
commitca6c74b7ee8f9a1a94521083215601ef635f1db3 (patch)
tree809bf6c0d03158e877f1213952247b53143326d1 /sql/item_cmpfunc.h
parenteba0a3aaadc3c82a87c60d6c58957ad776fba2ff (diff)
parent491cdf396fe45d1246e5ab664e0d4192244f89fd (diff)
downloadmariadb-git-ca6c74b7ee8f9a1a94521083215601ef635f1db3.tar.gz
merge
sql/item.h: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/sql_lex.cc: Auto merged sql/sql_select.h: Auto merged sql/sql_yacc.yy: 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 03775bbf375..42ece007a54 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;