~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_load.cc

  • Committer: Eric Herman
  • Date: 2008-12-06 19:42:46 UTC
  • mto: (656.1.6 devel)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: eric@mysql.com-20081206194246-5cdexuu81i366eek
removed trailing whitespace with simple script:

for file in $(find . -name "*.c") $(find . -name "*.cc") $(find . -name "*.h"); do ruby -pe 'gsub(/\s+$/, $/)' < $file > $file.out; mv $file.out $file; done;

Show diffs side-by-side

added added

removed removed

Lines of Context:
366
366
  free_blobs(table);                            /* if pack_blob was used */
367
367
  table->copy_blobs=0;
368
368
  session->count_cuted_fields= CHECK_FIELD_IGNORE;
369
 
  /* 
 
369
  /*
370
370
     simulated killing in the middle of per-row loop
371
371
     must be effective for binlogging
372
372
  */
418
418
  bool err;
419
419
 
420
420
  id= 0;
421
 
 
 
421
 
422
422
  while (!read_info.read_fixed_length())
423
423
  {
424
424
    if (session->killed)
450
450
    */
451
451
    while ((sql_field= (Item_field*) it++))
452
452
    {
453
 
      Field *field= sql_field->field;                  
 
453
      Field *field= sql_field->field;
454
454
      if (field == table->next_number_field)
455
455
        table->auto_increment_field_not_null= true;
456
456
      /*
463
463
      if (pos == read_info.row_end)
464
464
      {
465
465
        session->cuted_fields++;                        /* Not enough fields */
466
 
        push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_WARN, 
467
 
                            ER_WARN_TOO_FEW_RECORDS, 
 
466
        push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
 
467
                            ER_WARN_TOO_FEW_RECORDS,
468
468
                            ER(ER_WARN_TOO_FEW_RECORDS), session->row_count);
469
469
        if (!field->maybe_null() && field->type() == DRIZZLE_TYPE_TIMESTAMP)
470
470
            ((Field_timestamp*) field)->set_time();
486
486
    if (pos != read_info.row_end)
487
487
    {
488
488
      session->cuted_fields++;                  /* To long row */
489
 
      push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_WARN, 
490
 
                          ER_WARN_TOO_MANY_RECORDS, 
491
 
                          ER(ER_WARN_TOO_MANY_RECORDS), session->row_count); 
 
489
      push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
 
490
                          ER_WARN_TOO_MANY_RECORDS,
 
491
                          ER(ER_WARN_TOO_MANY_RECORDS), session->row_count);
492
492
    }
493
493
 
494
494
    if (session->killed ||
500
500
    table->auto_increment_field_not_null= false;
501
501
    if (err)
502
502
      return(1);
503
 
   
 
503
 
504
504
    /*
505
505
      We don't need to reset auto-increment field since we are restoring
506
506
      its default value at the beginning of each loop iteration.
510
510
    if (read_info.line_cuted)
511
511
    {
512
512
      session->cuted_fields++;                  /* To long row */
513
 
      push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_WARN, 
514
 
                          ER_WARN_TOO_MANY_RECORDS, 
515
 
                          ER(ER_WARN_TOO_MANY_RECORDS), session->row_count); 
 
513
      push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
 
514
                          ER_WARN_TOO_MANY_RECORDS,
 
515
                          ER(ER_WARN_TOO_MANY_RECORDS), session->row_count);
516
516
    }
517
517
    session->row_count++;
518
518
  }
691
691
    if (read_info.line_cuted)
692
692
    {
693
693
      session->cuted_fields++;                  /* To long row */
694
 
      push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_WARN, 
695
 
                          ER_WARN_TOO_MANY_RECORDS, ER(ER_WARN_TOO_MANY_RECORDS), 
696
 
                          session->row_count);   
 
694
      push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_WARN,
 
695
                          ER_WARN_TOO_MANY_RECORDS, ER(ER_WARN_TOO_MANY_RECORDS),
 
696
                          session->row_count);
697
697
      if (session->killed)
698
698
        return(1);
699
699
    }