~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/size.cc

  • Committer: Andrew Hutchings
  • Date: 2011-03-29 20:45:43 UTC
  • mfrom: (2257 drizzle)
  • mto: (2257.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: andrew@linuxjedi.co.uk-20110329204543-ssex0nuo8knncgwx
Merge with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
  assert(unsigned_arg);
75
75
}
76
76
 
77
 
int Size::store(const char *from,uint32_t len, const CHARSET_INFO * const cs)
 
77
int Size::store(const char *from,uint32_t len, const charset_info_st * const cs)
78
78
{
79
79
  int error= 0;
80
80
  char *end;
83
83
  ASSERT_COLUMN_MARKED_FOR_WRITE;
84
84
 
85
85
  tmp= cs->cset->strntoull10rnd(cs, from, len, false, &end,&error);
86
 
  if (error == MY_ERRNO_ERANGE)
 
86
  if (error == ERANGE)
87
87
  {
88
88
    set_warning(DRIZZLE_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
89
89
    error= 1;
183
183
 
184
184
String *Size::val_str(String *val_buffer, String *) const
185
185
{
186
 
  const CHARSET_INFO * const cs= &my_charset_bin;
 
186
  const charset_info_st * const cs= &my_charset_bin;
187
187
  uint32_t length;
188
188
  uint32_t mlength= max(field_length+1,22*cs->mbmaxlen);
189
189
  val_buffer->alloc(mlength);
240
240
 
241
241
void Size::sql_type(String &res) const
242
242
{
243
 
  const CHARSET_INFO * const cs=res.charset();
 
243
  const charset_info_st * const cs=res.charset();
244
244
  res.length(cs->cset->snprintf(cs,(char*) res.ptr(),res.alloced_length(), "unsigned integer"));
245
245
}
246
246