22 #include <drizzled/function/str/export_set.h>
33 uint64_t the_set = (uint64_t) args[0]->val_int();
35 yes = args[1]->val_str(&yes_buf);
37 no = args[2]->val_str(&no_buf);
38 String *sep = NULL, sep_buf ;
40 uint32_t num_set_values = 64;
43 str->set_charset(collation.collation);
46 if (args[0]->null_value || args[1]->null_value || args[2]->null_value)
57 num_set_values = (uint) args[4]->val_int();
58 if (num_set_values > 64)
60 if (args[4]->null_value)
67 if (!(sep = args[3]->val_str(&sep_buf)))
75 sep_buf.copy(STRING_WITH_LEN(
","), collation.collation);
84 for (uint32_t i = 0; i < num_set_values; i++, mask = (mask << 1))
90 if (i != num_set_values - 1)
96 void Item_func_export_set::fix_length_and_dec()
98 uint32_t length= max(args[1]->max_length,args[2]->max_length);
99 uint32_t sep_length= (arg_count > 3 ? args[3]->max_length : 1);
100 max_length= length*64+sep_length*63;
102 if (agg_arg_charsets(collation, args+1, min(4U,arg_count)-1,
103 MY_COLL_ALLOW_CONV, 1))
TODO: Rename this file - func.h is stupid.