~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/mf_iocache.cc

  • Committer: Olaf van der Spek
  • Date: 2011-06-24 15:25:06 UTC
  • mto: This revision was merged to the branch mainline in revision 2349.
  • Revision ID: olafvdspek@gmail.com-20110624152506-zivk37gp51e9w84u
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
411
411
      */
412
412
      assert(errno != ESPIPE);
413
413
      info->error= -1;
414
 
      return(1);
 
414
      return 1;
415
415
    }
416
416
  }
417
417
 
422
422
    if (info->end_of_file <= pos_in_file_local)
423
423
    {                                   /* End of file */
424
424
      info->error= (int) left_length;
425
 
      return(1);
 
425
      return 1;
426
426
    }
427
427
    length_local=(Count & (size_t) ~(IO_SIZE-1))-diff_length;
428
428
    if ((read_length= my_read(info->file,Buffer, length_local, info->myflags)) != length_local)
429
429
    {
430
430
      info->error= (read_length == (size_t) -1 ? -1 :
431
431
                    (int) (read_length+left_length));
432
 
      return(1);
 
432
      return 1;
433
433
    }
434
434
    Count-= length_local;
435
435
    Buffer+= length_local;
447
447
    if (Count)
448
448
    {
449
449
      info->error= static_cast<int>(left_length);       /* We only got this many char */
450
 
      return(1);
 
450
      return 1;
451
451
    }
452
452
     length_local=0;                            /* Didn't read any chars */
453
453
  }
460
460
    info->pos_in_file= pos_in_file_local;
461
461
    info->error=  length_local == (size_t) -1 ? -1 : (int) ( length_local+left_length);
462
462
    info->read_pos=info->read_end=info->buffer;
463
 
    return(1);
 
463
    return 1;
464
464
  }
465
465
  info->read_pos=info->buffer+Count;
466
466
  info->read_end=info->buffer+ length_local;