~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/blob.cc

  • Committer: Lee Bieber
  • Date: 2010-12-15 16:23:36 UTC
  • mfrom: (1995.1.2 build)
  • Revision ID: kalebral@gmail.com-20101215162336-juntyt4gw4vgohg4
Merge Andrew - fix bug 628912: Crash / segfault in drizzled::Item_func::arguments (this=0x35) at ./drizzled/function/func.h
Merge Andrew - 663919: next query after KILL QUERY will error

Show diffs side-by-side

added added

removed removed

Lines of Context:
272
272
}
273
273
 
274
274
 
275
 
type::Decimal *Field_blob::val_decimal(type::Decimal *decimal_value)
 
275
my_decimal *Field_blob::val_decimal(my_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
 
  {
290
289
    length= get_length(ptr);
291
 
  }
292
 
 
293
 
  decimal_value->store(E_DEC_FATAL_ERROR, blob, length, charset());
294
 
 
 
290
 
 
291
  str2my_decimal(E_DEC_FATAL_ERROR, blob, length, charset(),
 
292
                 decimal_value);
295
293
  return decimal_value;
296
294
}
297
295
 
426
424
 
427
425
uint32_t Field_blob::sort_length() const
428
426
{
429
 
  return (uint32_t) (getTable()->getSession()->variables.max_sort_length +
 
427
  return (uint32_t) (current_session->variables.max_sort_length +
430
428
                     (field_charset == &my_charset_bin ? 0 : sizeof(uint32_t)));
431
429
}
432
430
 
522
520
                                        bool low_byte_first)
523
521
{
524
522
  uint32_t const length= get_length(from, low_byte_first);
525
 
  getTable()->setWriteSet(position());
 
523
  getTable()->setWriteSet(field_index);
526
524
  store(reinterpret_cast<const char*>(from) + sizeof(uint32_t),
527
525
        length, field_charset);
528
526
  return(from + sizeof(uint32_t) + length);