22#include <drizzled/function/str/make_set.h>
23#include <drizzled/session.h>
27void Item_func_make_set::update_used_tables()
29 Item_func::update_used_tables();
30 item->update_used_tables();
31 used_tables_cache|=item->used_tables();
32 const_item_cache&=item->const_item();
39 item->split_sum_func(session_arg, ref_pointer_array, fields, &item,
true);
44void Item_func_make_set::fix_length_and_dec()
46 max_length=arg_count-1;
48 if (agg_arg_charsets(collation, args, arg_count, MY_COLL_ALLOW_CONV, 1))
51 for (uint32_t i=0 ; i < arg_count ; i++)
52 max_length+=args[i]->max_length;
54 used_tables_cache|= item->used_tables();
55 not_null_tables_cache&= item->not_null_tables();
56 const_item_cache&= item->const_item();
57 with_sum_func= with_sum_func || item->with_sum_func;
66 String *result=&my_empty_string;
73 bits &= ((uint64_t) 1 << arg_count)-1;
75 for (; bits; bits >>= 1, ptr++)
79 String *res= (*ptr)->val_str(str);
95 if (result != &tmp_str)
97 tmp_str.alloc(result->length()+res->length()+1);
98 tmp_str.copy(*result);
101 tmp_str.append(STRING_WITH_LEN(
","));
102 tmp_str.append(*res);
123 str->append(STRING_WITH_LEN(
"make_set("));
virtual void print(String *str)
String * val_str(String *str)
void split_sum_func(Session *session_arg, Item **ref_pointer_array, List< Item > &fields)
Item * transform(Item_transformer transformer, unsigned char *arg)
virtual void split_sum_func(Session *session, Item **ref_pointer_array, List< Item > &fields)
Item * transform(Item_transformer transformer, unsigned char *arg)
virtual Item * transform(Item_transformer transformer, unsigned char *arg)
TODO: Rename this file - func.h is stupid.