~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field_conv.cc

  • Committer: Brian Aker
  • Date: 2010-12-16 04:01:22 UTC
  • mfrom: (1996.2.1 compare)
  • Revision ID: brian@tangent.org-20101216040122-eodh5shwsij35ybe
Merge in uuid tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
307
307
 
308
308
static void do_conv_blob(CopyField *copy)
309
309
{
310
 
  copy->from_field->val_str(&copy->tmp);
 
310
  copy->from_field->val_str_internal(&copy->tmp);
311
311
  ((Field_blob *) copy->to_field)->store(copy->tmp.ptr(),
312
312
                                         copy->tmp.length(),
313
313
                                         copy->tmp.charset());
319
319
{
320
320
  char buff[MAX_FIELD_WIDTH];
321
321
  String res(buff, sizeof(buff), copy->tmp.charset());
322
 
  copy->from_field->val_str(&res);
 
322
  copy->from_field->val_str_internal(&res);
323
323
  copy->tmp.copy(res);
324
324
  ((Field_blob *) copy->to_field)->store(copy->tmp.ptr(),
325
325
                                         copy->tmp.length(),
331
331
{
332
332
  char buff[MAX_FIELD_WIDTH];
333
333
  copy->tmp.set_quick(buff,sizeof(buff),copy->tmp.charset());
334
 
  copy->from_field->val_str(&copy->tmp);
 
334
  copy->from_field->val_str_internal(&copy->tmp);
335
335
  copy->to_field->store(copy->tmp.c_ptr_quick(),copy->tmp.length(),
336
336
                        copy->tmp.charset());
337
337
}
805
805
  if (to->type() == DRIZZLE_TYPE_BLOB)
806
806
  {                                             // Be sure the value is stored
807
807
    Field_blob *blob=(Field_blob*) to;
808
 
    from->val_str(&blob->value);
 
808
    from->val_str_internal(&blob->value);
809
809
    /*
810
810
      Copy value if copy_blobs is set, or source is not a string and
811
811
      we have a pointer to its internal string conversion buffer.
829
829
  {
830
830
    char buff[MAX_FIELD_WIDTH];
831
831
    String result(buff,sizeof(buff),from->charset());
832
 
    from->val_str(&result);
 
832
    from->val_str_internal(&result);
833
833
    /*
834
834
      We use c_ptr_quick() here to make it easier if to is a float/double
835
835
      as the conversion routines will do a copy of the result doesn't