~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item_func.cc

break out item_real_func into functions directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
}
49
49
 
50
50
 
51
 
 
52
 
String *Item_real_func::val_str(String *str)
53
 
{
54
 
  assert(fixed == 1);
55
 
  double nr= val_real();
56
 
  if (null_value)
57
 
    return 0; /* purecov: inspected */
58
 
  str->set_real(nr,decimals, &my_charset_bin);
59
 
  return str;
60
 
}
61
 
 
62
 
 
63
 
my_decimal *Item_real_func::val_decimal(my_decimal *decimal_value)
64
 
{
65
 
  assert(fixed);
66
 
  double nr= val_real();
67
 
  if (null_value)
68
 
    return 0; /* purecov: inspected */
69
 
  double2my_decimal(E_DEC_FATAL_ERROR, nr, decimal_value);
70
 
  return decimal_value;
71
 
}
72
 
 
73
 
 
74
51
void Item_func::fix_num_length_and_dec()
75
52
{
76
53
  uint32_t fl_length= 0;