~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/mi_extra.c

  • Committer: Brian Aker
  • Date: 2008-08-11 18:22:04 UTC
  • Revision ID: brian@tangent.org-20080811182204-bg5vginrflmjjcc9
Sqlech issues with pack

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
    }
70
70
    if (info->s->file_map) /* Don't use cache if mmap */
71
71
      break;
72
 
#if defined(HAVE_MMAP) && defined(HAVE_MADVISE)
73
 
    if ((share->options & HA_OPTION_COMPRESS_RECORD))
74
 
    {
75
 
      pthread_mutex_lock(&share->intern_lock);
76
 
      if (_mi_memmap_file(info))
77
 
      {
78
 
        /* We don't nead MADV_SEQUENTIAL if small file */
79
 
        madvise((char*) share->file_map, share->state.state.data_file_length,
80
 
                share->state.state.data_file_length <= RECORD_CACHE_SIZE*16 ?
81
 
                MADV_RANDOM : MADV_SEQUENTIAL);
82
 
        pthread_mutex_unlock(&share->intern_lock);
83
 
        break;
84
 
      }
85
 
      pthread_mutex_unlock(&share->intern_lock);
86
 
    }
87
 
#endif
88
72
    if (info->opt_flag & WRITE_CACHE_USED)
89
73
    {
90
74
      info->opt_flag&= ~WRITE_CACHE_USED;