~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Andrew Hutchings
  • Date: 2010-11-18 13:17:52 UTC
  • mto: (1938.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1939.
  • Revision ID: andrew@linuxjedi.co.uk-20101118131752-2i9nlxuwzov302ju
Cleanup after bug fix

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
}
54
54
 
55
55
 
56
 
type::Decimal *Item_str_func::val_decimal(type::Decimal *decimal_value)
 
56
my_decimal *Item_str_func::val_decimal(my_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 (not res)
 
62
  if (!res)
63
63
    return 0;
64
 
 
65
 
  (void)decimal_value->store(E_DEC_FATAL_ERROR, (char*) res->ptr(), res->length(), res->charset());
66
 
 
 
64
  (void)str2my_decimal(E_DEC_FATAL_ERROR, (char*) res->ptr(),
 
65
                       res->length(), res->charset(), decimal_value);
67
66
  return decimal_value;
68
67
}
69
68