~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/blob.cc

Merge with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
272
272
}
273
273
 
274
274
 
275
 
my_decimal *Field_blob::val_decimal(my_decimal *decimal_value)
 
275
type::Decimal *Field_blob::val_decimal(type::Decimal *decimal_value)
276
276
{
277
277
  const char *blob;
278
278
  size_t length;
286
286
    length= 0;
287
287
  }
288
288
  else
 
289
  {
289
290
    length= get_length(ptr);
290
 
 
291
 
  str2my_decimal(E_DEC_FATAL_ERROR, blob, length, charset(),
292
 
                 decimal_value);
 
291
  }
 
292
 
 
293
  decimal_value->store(E_DEC_FATAL_ERROR, blob, length, charset());
 
294
 
293
295
  return decimal_value;
294
296
}
295
297
 
424
426
 
425
427
uint32_t Field_blob::sort_length() const
426
428
{
427
 
  return (uint32_t) (current_session->variables.max_sort_length +
 
429
  return (uint32_t) (getTable()->getSession()->variables.max_sort_length +
428
430
                     (field_charset == &my_charset_bin ? 0 : sizeof(uint32_t)));
429
431
}
430
432