22 #include <drizzled/type/decimal.h>
23 #include <drizzled/function/math/int_val.h>
28 void Item_func_int_val::fix_num_length_and_dec()
30 max_length= args[0]->max_length - (args[0]->decimals ?
31 args[0]->decimals + 1 :
33 uint32_t tmp= float_length(decimals);
34 set_if_smaller(max_length,tmp);
40 switch(hybrid_type= args[0]->result_type())
44 hybrid_type= REAL_RESULT;
45 max_length= float_length(decimals);
53 if ((args[0]->max_length - args[0]->decimals) >=
54 (DECIMAL_LONGLONG_DIGITS - 2))
56 hybrid_type= DECIMAL_RESULT;
60 unsigned_flag= args[0]->unsigned_flag;
61 hybrid_type= INT_RESULT;