~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_dynrec.cc

  • Committer: Mark Atwood
  • Date: 2011-08-17 19:14:47 UTC
  • mfrom: (2385.3.17 rf)
  • Revision ID: me@mark.atwood.name-20110817191447-h86yzddvycd0xmof
mergeĀ lp:~olafvdspek/drizzle/refactor6

Show diffs side-by-side

added added

removed removed

Lines of Context:
717
717
    if (info->update & HA_STATE_EXTEND_BLOCK)
718
718
    {
719
719
      info->update&= ~HA_STATE_EXTEND_BLOCK;
720
 
      if (my_block_write(&info->rec_cache,(unsigned char*) *record-head_length,
 
720
      if (info->rec_cache.block_write(*record - head_length,
721
721
                         length+extra_length+del_length,filepos))
722
722
      goto err;
723
723
    }
724
 
    else if (my_b_write(&info->rec_cache,(unsigned char*) *record-head_length,
725
 
                        length+extra_length+del_length))
 
724
    else if (info->rec_cache.write(*record-head_length, length+extra_length+del_length))
726
725
      goto err;
727
726
  }
728
727
  else
1405
1404
        goto panic;
1406
1405
      if (info->opt_flag & WRITE_CACHE_USED &&
1407
1406
          info->rec_cache.pos_in_file < filepos + MI_BLOCK_INFO_HEADER_LENGTH &&
1408
 
          flush_io_cache(&info->rec_cache))
 
1407
          info->rec_cache.flush())
1409
1408
        goto err;
1410
1409
      info->rec_cache.seek_not_done=1;
1411
1410
      if ((b_type= _mi_get_block_info(&block_info, file, filepos))
1453
1452
      {
1454
1453
        if (info->opt_flag & WRITE_CACHE_USED &&
1455
1454
            info->rec_cache.pos_in_file < filepos + block_info.data_len &&
1456
 
            flush_io_cache(&info->rec_cache))
 
1455
            info->rec_cache.flush())
1457
1456
          goto err;
1458
1457
        /*
1459
1458
          What a pity that this method is not called 'file_pread' and that
1525
1524
  if (info->opt_flag & WRITE_CACHE_USED)
1526
1525
  {
1527
1526
    info->update&= ~(HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK);
1528
 
    if (flush_io_cache(&info->rec_cache))
 
1527
    if (info->rec_cache.flush())
1529
1528
      return(-1);
1530
1529
  }
1531
1530
  info->rec_cache.seek_not_done=1;
1704
1703
    {
1705
1704
      if (info->opt_flag & WRITE_CACHE_USED &&
1706
1705
          info->rec_cache.pos_in_file < filepos + MI_BLOCK_INFO_HEADER_LENGTH &&
1707
 
          flush_io_cache(&info->rec_cache))
 
1706
          info->rec_cache.flush())
1708
1707
        return(errno);
1709
1708
      info->rec_cache.seek_not_done=1;
1710
1709
      b_type=_mi_get_block_info(&block_info,info->dfile,filepos);
1779
1778
        if (info->opt_flag & WRITE_CACHE_USED &&
1780
1779
            info->rec_cache.pos_in_file <
1781
1780
            block_info.filepos + block_info.data_len &&
1782
 
            flush_io_cache(&info->rec_cache))
 
1781
            info->rec_cache.flush())
1783
1782
          goto err;
1784
1783
        /* lseek(info->dfile,filepos,SEEK_SET); */
1785
1784
        if (internal::my_read(info->dfile,(unsigned char*) to,block_info.data_len,MYF(MY_NABP)))