~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/str/strfunc.cc

fixed build warnings

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
}
54
54
 
55
55
 
56
 
my_decimal *Item_str_func::val_decimal(my_decimal *decimal_value)
 
56
type::Decimal *Item_str_func::val_decimal(type::Decimal *decimal_value)
57
57
{
58
58
  assert(fixed == 1);
59
59
  char buff[64];
60
60
  String *res, tmp(buff,sizeof(buff), &my_charset_bin);
61
61
  res= val_str(&tmp);
62
 
  if (!res)
 
62
  if (not res)
63
63
    return 0;
64
 
  (void)str2my_decimal(E_DEC_FATAL_ERROR, (char*) res->ptr(),
65
 
                       res->length(), res->charset(), decimal_value);
 
64
 
 
65
  (void)decimal_value->store(E_DEC_FATAL_ERROR, (char*) res->ptr(), res->length(), res->charset());
 
66
 
66
67
  return decimal_value;
67
68
}
68
69