~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_load.cc

  • Committer: Brian Aker
  • Date: 2008-08-05 04:10:42 UTC
  • mfrom: (261.2.8 codestyle)
  • mto: This revision was merged to the branch mainline in revision 263.
  • Revision ID: brian@tangent.org-20080805041042-1l4893r3bwy2lxz2
Merge from Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
327
327
  }
328
328
 
329
329
  COPY_INFO info;
330
 
  memset((char*) &info, 0, sizeof(info));
 
330
  memset(&info, 0, sizeof(info));
331
331
  info.ignore= ignore;
332
332
  info.handle_duplicates=handle_duplicates;
333
333
  info.escape_char=escaped->length() ? (*escaped)[0] : INT_MAX;
591
591
      if (pos == read_info.row_end)
592
592
      {
593
593
        thd->cuted_fields++;                    /* Not enough fields */
594
 
        push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 
 
594
        push_warning_printf(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN, 
595
595
                            ER_WARN_TOO_FEW_RECORDS, 
596
596
                            ER(ER_WARN_TOO_FEW_RECORDS), thd->row_count);
597
597
        if (!field->maybe_null() && field->type() == DRIZZLE_TYPE_TIMESTAMP)
614
614
    if (pos != read_info.row_end)
615
615
    {
616
616
      thd->cuted_fields++;                      /* To long row */
617
 
      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 
 
617
      push_warning_printf(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN, 
618
618
                          ER_WARN_TOO_MANY_RECORDS, 
619
619
                          ER(ER_WARN_TOO_MANY_RECORDS), thd->row_count); 
620
620
    }
638
638
    if (read_info.line_cuted)
639
639
    {
640
640
      thd->cuted_fields++;                      /* To long row */
641
 
      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 
 
641
      push_warning_printf(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN, 
642
642
                          ER_WARN_TOO_MANY_RECORDS, 
643
643
                          ER(ER_WARN_TOO_MANY_RECORDS), thd->row_count); 
644
644
    }
713
713
            if (field->type() == DRIZZLE_TYPE_TIMESTAMP)
714
714
              ((Field_timestamp*) field)->set_time();
715
715
            else if (field != table->next_number_field)
716
 
              field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
 
716
              field->set_warning(DRIZZLE_ERROR::WARN_LEVEL_WARN,
717
717
                                 ER_WARN_NULL_TO_NOTNULL, 1);
718
718
          }
719
719
        }
784
784
            in the end ?)
785
785
          */
786
786
          thd->cuted_fields++;
787
 
          push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
787
          push_warning_printf(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
788
788
                              ER_WARN_TOO_FEW_RECORDS,
789
789
                              ER(ER_WARN_TOO_FEW_RECORDS), thd->row_count);
790
790
        }
819
819
    if (read_info.line_cuted)
820
820
    {
821
821
      thd->cuted_fields++;                      /* To long row */
822
 
      push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 
 
822
      push_warning_printf(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN, 
823
823
                          ER_WARN_TOO_MANY_RECORDS, ER(ER_WARN_TOO_MANY_RECORDS), 
824
824
                          thd->row_count);   
825
825
      if (thd->killed)
896
896
            if (field->type() == DRIZZLE_TYPE_TIMESTAMP)
897
897
              ((Field_timestamp *) field)->set_time();
898
898
            else if (field != table->next_number_field)
899
 
              field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
 
899
              field->set_warning(DRIZZLE_ERROR::WARN_LEVEL_WARN,
900
900
                                 ER_WARN_NULL_TO_NOTNULL, 1);
901
901
          }
902
902
        }
946
946
            in the end ?)
947
947
          */
948
948
          thd->cuted_fields++;
949
 
          push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 
949
          push_warning_printf(thd, DRIZZLE_ERROR::WARN_LEVEL_WARN,
950
950
                              ER_WARN_TOO_FEW_RECORDS,
951
951
                              ER(ER_WARN_TOO_FEW_RECORDS), thd->row_count);
952
952
        }