~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mf_keycache.cc

Extracted the LOAD command into its own class and implementation files.
Removed the corresponding case label from the switch statement.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3741
3741
 
3742
3742
  SYNOPSIS
3743
3743
    reset_key_cache_counters()
 
3744
    name       the name of a key cache
 
3745
    key_cache  pointer to the key kache to be reset
3744
3746
 
3745
3747
  DESCRIPTION
3746
 
   This procedure is used by process_key_caches() to reset the key_cache.
 
3748
   This procedure is used by process_key_caches() to reset the counters of all
 
3749
   currently used key caches, both the default one and the named ones.
3747
3750
 
3748
3751
  RETURN
3749
3752
    0 on success (always because it can't fail)
3750
3753
*/
3751
3754
 
3752
 
void reset_key_cache_counters()
 
3755
int reset_key_cache_counters(const char *name, KEY_CACHE *key_cache)
3753
3756
{
3754
 
  dflt_key_cache->global_blocks_changed= 0;   /* Key_blocks_not_flushed */
3755
 
  dflt_key_cache->global_cache_r_requests= 0; /* Key_read_requests */
3756
 
  dflt_key_cache->global_cache_read= 0;       /* Key_reads */
3757
 
  dflt_key_cache->global_cache_w_requests= 0; /* Key_write_requests */
3758
 
  dflt_key_cache->global_cache_write= 0;      /* Key_writes */
 
3757
  (void)name;
 
3758
  if (!key_cache->key_cache_inited)
 
3759
  {
 
3760
    return(0);
 
3761
  }
 
3762
  key_cache->global_blocks_changed= 0;   /* Key_blocks_not_flushed */
 
3763
  key_cache->global_cache_r_requests= 0; /* Key_read_requests */
 
3764
  key_cache->global_cache_read= 0;       /* Key_reads */
 
3765
  key_cache->global_cache_w_requests= 0; /* Key_write_requests */
 
3766
  key_cache->global_cache_write= 0;      /* Key_writes */
 
3767
  return(0);
3759
3768
}
3760
3769
 
3761
3770
#if defined(KEYCACHE_TIMEOUT)