~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mf_keycache.cc

  • Committer: Brian Aker
  • Date: 2010-08-11 06:07:52 UTC
  • mfrom: (1698.2.4 drizzle)
  • Revision ID: brian@gaz-20100811060752-nlxybv6ch3t0dx8i
MergeĀ fromĀ staging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
259
259
 
260
260
 
261
261
/*
262
 
  Increment counter blocking resize key cache operation
263
 
*/
264
 
static inline void inc_counter_for_resize_op(KEY_CACHE *keycache)
265
 
{
266
 
  keycache->cnt_for_resize_op++;
267
 
}
268
 
 
269
 
 
270
 
/*
271
262
  Remove key_cache from memory
272
263
 
273
264
  SYNOPSIS
342
333
 
343
334
  assert (! keycache->key_cache_inited);
344
335
 
345
 
  /* Key cache is not used */
346
 
 
347
 
  keycache->global_cache_r_requests++;
348
 
  keycache->global_cache_read++;
349
 
 
350
336
  if (!pread(file, (unsigned char*) buff, length, filepos))
351
337
    error= 1;
352
338
  return(error ? (unsigned char*) 0 : start);
431
417
  {
432
418
    /* Not used in the server. */
433
419
    /* Force writing from buff into disk. */
434
 
    keycache->global_cache_w_requests++;
435
 
    keycache->global_cache_write++;
436
420
    if (pwrite(file, buff, length, filepos) == 0)
437
421
      return(1);
438
422
  }
443
427
  if (dont_write)
444
428
  {
445
429
    /* Used in the server. */
446
 
    keycache->global_cache_w_requests++;
447
 
    keycache->global_cache_write++;
448
430
    if (pwrite(file, (unsigned char*) buff, length, filepos) == 0)
449
431
      error=1;
450
432
  }