~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_load.cc

  • Committer: Mark Atwood
  • Date: 2011-06-25 15:38:53 UTC
  • mfrom: (2318.6.78 refactor16)
  • Revision ID: me@mark.atwood.name-20110625153853-za5fjiwd3z0aykdd
mergeĀ lp:~olafvdspek/drizzle/refactor16

Show diffs side-by-side

added added

removed removed

Lines of Context:
444
444
    if (session->getKilled())
445
445
    {
446
446
      session->send_kill_message();
447
 
      return(1);
 
447
      return 1;
448
448
    }
449
449
    if (skip_lines)
450
450
    {
518
518
    if (session->getKilled() ||
519
519
        fill_record(session, set_fields, set_values,
520
520
                    ignore_check_option_errors))
521
 
      return(1);
 
521
      return 1;
522
522
 
523
523
    err= write_record(session, table, &info);
524
524
    table->auto_increment_field_not_null= false;
525
525
    if (err)
526
 
      return(1);
 
526
      return 1;
527
527
 
528
528
    /*
529
529
      We don't need to reset auto-increment field since we are restoring
565
565
    if (session->getKilled())
566
566
    {
567
567
      session->send_kill_message();
568
 
      return(1);
 
568
      return 1;
569
569
    }
570
570
 
571
571
    table->restoreRecordAsDefault();
599
599
          {
600
600
            my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0), field->field_name,
601
601
                     session->row_count);
602
 
            return(1);
 
602
            return 1;
603
603
          }
604
604
          field->set_null();
605
605
          if (not field->maybe_null())
622
622
        else
623
623
        {
624
624
          my_error(ER_LOAD_DATA_INVALID_COLUMN, MYF(0), item->full_name());
625
 
          return(1);
 
625
          return 1;
626
626
        }
627
627
 
628
628
        continue;
645
645
      else
646
646
      {
647
647
        my_error(ER_LOAD_DATA_INVALID_COLUMN, MYF(0), item->full_name());
648
 
        return(1);
 
648
        return 1;
649
649
      }
650
650
    }
651
651
    if (read_info.error)
670
670
          {
671
671
            my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0),field->field_name,
672
672
                     session->row_count);
673
 
            return(1);
 
673
            return 1;
674
674
          }
675
675
          if (not field->maybe_null() and field->is_timestamp())
676
676
              ((field::Epoch::pointer) field)->set_time();
693
693
        else
694
694
        {
695
695
          my_error(ER_LOAD_DATA_INVALID_COLUMN, MYF(0), item->full_name());
696
 
          return(1);
 
696
          return 1;
697
697
        }
698
698
      }
699
699
    }
701
701
    if (session->getKilled() ||
702
702
        fill_record(session, set_fields, set_values,
703
703
                    ignore_check_option_errors))
704
 
      return(1);
 
704
      return 1;
705
705
 
706
706
    err= write_record(session, table, &info);
707
707
    table->auto_increment_field_not_null= false;
708
708
    if (err)
709
 
      return(1);
 
709
      return 1;
710
710
    /*
711
711
      We don't need to reset auto-increment field since we are restoring
712
712
      its default value at the beginning of each loop iteration.
720
720
                          ER_WARN_TOO_MANY_RECORDS, ER(ER_WARN_TOO_MANY_RECORDS),
721
721
                          session->row_count);
722
722
      if (session->getKilled())
723
 
        return(1);
 
723
        return 1;
724
724
    }
725
725
    session->row_count++;
726
726
  }