~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_statrec.cc

  • Committer: Olaf van der Spek
  • Date: 2011-08-14 12:20:36 UTC
  • mto: This revision was merged to the branch mainline in revision 2407.
  • Revision ID: olafvdspek@gmail.com-20110814122036-ydjayvqjgwixp3o8
Refactor iocache

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
    }
50
50
    if (info->opt_flag & WRITE_CACHE_USED)
51
51
    {                           /* Cash in use */
52
 
      if (my_b_write(&info->rec_cache, record,
53
 
                     info->s->base.reclength))
 
52
      if (info->rec_cache.write(record, info->s->base.reclength))
54
53
        goto err;
55
54
      if (info->s->base.pack_reclength != info->s->base.reclength)
56
55
      {
57
56
        uint32_t length=info->s->base.pack_reclength - info->s->base.reclength;
58
57
        memset(temp, 0, length);
59
 
        if (my_b_write(&info->rec_cache, temp,length))
 
58
        if (info->rec_cache.write(temp,length))
60
59
          goto err;
61
60
      }
62
61
    }
252
251
  }
253
252
 
254
253
        /* Read record with cacheing */
255
 
  error=my_b_read(&info->rec_cache,(unsigned char*) buf,share->base.reclength);
 
254
  error= info->rec_cache.read(buf, share->base.reclength);
256
255
  if (info->s->base.pack_reclength != info->s->base.reclength && !error)
257
256
  {
258
257
    char tmp[8];                                /* Skill fill bytes */
259
 
    error=my_b_read(&info->rec_cache,(unsigned char*) tmp,
260
 
                    info->s->base.pack_reclength - info->s->base.reclength);
 
258
    error= info->rec_cache.read(tmp, info->s->base.pack_reclength - info->s->base.reclength);
261
259
  }
262
260
  if (locked)
263
261
    _mi_writeinfo(info,0);              /* Unlock keyfile */