22 #include <drizzled/function/field.h>
23 #include <drizzled/item/cmpfunc.h>
34 if (cmp_type == STRING_RESULT)
37 if (!(field= args[0]->
val_str(&value)))
39 for (uint32_t i=1 ; i < arg_count ; i++)
42 if (tmp_value && !sortcmp(field,tmp_value,cmp_collation.collation))
46 else if (cmp_type == INT_RESULT)
48 int64_t val= args[0]->
val_int();
51 for (uint32_t i=1; i < arg_count ; i++)
57 else if (cmp_type == DECIMAL_RESULT)
63 for (uint32_t i=1; i < arg_count; i++)
75 for (uint32_t i=1; i < arg_count ; i++)
84 void Item_func_field::fix_length_and_dec()
87 cmp_type= args[0]->result_type();
88 for (uint32_t i=1; i < arg_count ; i++)
89 cmp_type= item_cmp_type(cmp_type, args[i]->result_type());
90 if (cmp_type == STRING_RESULT)
91 agg_arg_charsets(cmp_collation, args, arg_count, MY_COLL_CMP_CONV, 1);