~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_dynrec.cc

  • Committer: Olaf van der Spek
  • Date: 2011-08-13 15:57:32 UTC
  • mto: This revision was merged to the branch mainline in revision 2407.
  • Revision ID: olafvdspek@gmail.com-20110813155732-jrr1aq3gyeyxl9qv
Move flush() into iocache

Show diffs side-by-side

added added

removed removed

Lines of Context:
1405
1405
        goto panic;
1406
1406
      if (info->opt_flag & WRITE_CACHE_USED &&
1407
1407
          info->rec_cache.pos_in_file < filepos + MI_BLOCK_INFO_HEADER_LENGTH &&
1408
 
          flush_io_cache(&info->rec_cache))
 
1408
          info->rec_cache.flush())
1409
1409
        goto err;
1410
1410
      info->rec_cache.seek_not_done=1;
1411
1411
      if ((b_type= _mi_get_block_info(&block_info, file, filepos))
1453
1453
      {
1454
1454
        if (info->opt_flag & WRITE_CACHE_USED &&
1455
1455
            info->rec_cache.pos_in_file < filepos + block_info.data_len &&
1456
 
            flush_io_cache(&info->rec_cache))
 
1456
            info->rec_cache.flush())
1457
1457
          goto err;
1458
1458
        /*
1459
1459
          What a pity that this method is not called 'file_pread' and that
1525
1525
  if (info->opt_flag & WRITE_CACHE_USED)
1526
1526
  {
1527
1527
    info->update&= ~(HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK);
1528
 
    if (flush_io_cache(&info->rec_cache))
 
1528
    if (info->rec_cache.flush())
1529
1529
      return(-1);
1530
1530
  }
1531
1531
  info->rec_cache.seek_not_done=1;
1704
1704
    {
1705
1705
      if (info->opt_flag & WRITE_CACHE_USED &&
1706
1706
          info->rec_cache.pos_in_file < filepos + MI_BLOCK_INFO_HEADER_LENGTH &&
1707
 
          flush_io_cache(&info->rec_cache))
 
1707
          info->rec_cache.flush())
1708
1708
        return(errno);
1709
1709
      info->rec_cache.seek_not_done=1;
1710
1710
      b_type=_mi_get_block_info(&block_info,info->dfile,filepos);
1779
1779
        if (info->opt_flag & WRITE_CACHE_USED &&
1780
1780
            info->rec_cache.pos_in_file <
1781
1781
            block_info.filepos + block_info.data_len &&
1782
 
            flush_io_cache(&info->rec_cache))
 
1782
            info->rec_cache.flush())
1783
1783
          goto err;
1784
1784
        /* lseek(info->dfile,filepos,SEEK_SET); */
1785
1785
        if (internal::my_read(info->dfile,(unsigned char*) to,block_info.data_len,MYF(MY_NABP)))