~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/csv/ha_tina.cc

Collection of patches/bug fixes from new-cleanup tree (none of the
Table/other fixes are included).

Show diffs side-by-side

added added

removed removed

Lines of Context:
498
498
      (*field)->set_notnull();
499
499
    }
500
500
 
 
501
    /* 
 
502
      Since we are needing to "translate" the type into a string we 
 
503
      will need to do a val_str(). This would cause an assert() to
 
504
      normally occur since we are onlying "writing" values.
 
505
    */
 
506
    (*field)->setReadSet();
501
507
    (*field)->val_str(&attribute,&attribute);
502
508
 
503
509
    if (was_null)
606
612
  off_t end_offset, curr_offset= current_position;
607
613
  int eoln_len;
608
614
  int error;
609
 
  bool read_all= false;
610
615
 
611
616
  free_root(&blobroot, MYF(MY_MARK_BLOCKS_FREE));
612
617
 
623
628
 
624
629
  memset(buf, 0, table->s->null_bytes);
625
630
 
626
 
  /* We need to first check to see if this is a write (rewrite this to something sane that knows if we are doing an update) */
627
 
  for (Field **field=table->field ; *field ; field++)
628
 
  {
629
 
    if ((*field)->isWriteSet())
630
 
    {
631
 
      read_all= true;
632
 
      break;
633
 
    }
634
 
  }
635
 
 
636
631
  for (Field **field=table->field ; *field ; field++)
637
632
  {
638
633
    char curr_char;
698
693
      }
699
694
    }
700
695
 
701
 
    if (read_all || (*field)->isReadSet())
 
696
    if ((*field)->isReadSet() || (*field)->isWriteSet())
702
697
    {
 
698
      /* This masks a bug in the logic for a SELECT * */
 
699
      (*field)->setWriteSet();
703
700
      if ((*field)->store(buffer.ptr(), buffer.length(), buffer.charset(),
704
701
                          CHECK_FIELD_WARN))
705
702
        goto err;
 
703
 
706
704
      if ((*field)->flags & BLOB_FLAG)
707
705
      {
708
706
        Field_blob *blob= *(Field_blob**) field;