~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_extra.cc

  • Committer: Brian Aker
  • Date: 2009-07-12 00:49:18 UTC
  • mfrom: (1063.9.51 brian-tmp-fix)
  • Revision ID: brian@gaz-20090712004918-chprmyj387ex6l8a
Merge Stewart

Show diffs side-by-side

added added

removed removed

Lines of Context:
333
333
  case HA_EXTRA_CHANGE_KEY_TO_DUP:
334
334
    mi_extra_keyflag(info, function);
335
335
    break;
336
 
  case HA_EXTRA_MMAP:
337
 
#ifdef HAVE_MMAP
338
 
    pthread_mutex_lock(&share->intern_lock);
339
 
    /*
340
 
      Memory map the data file if it is not already mapped. It is safe
341
 
      to memory map a file while other threads are using file I/O on it.
342
 
      Assigning a new address to a function pointer is an atomic
343
 
      operation. intern_lock prevents that two or more mappings are done
344
 
      at the same time.
345
 
    */
346
 
    if (!share->file_map)
347
 
    {
348
 
      if (mi_dynmap_file(info, share->state.state.data_file_length))
349
 
      {
350
 
        error= my_errno= errno;
351
 
      }
352
 
      else
353
 
      {
354
 
        share->file_read= mi_mmap_pread;
355
 
        share->file_write= mi_mmap_pwrite;
356
 
      }
357
 
    }
358
 
    pthread_mutex_unlock(&share->intern_lock);
359
 
#endif
360
 
    break;
361
336
  case HA_EXTRA_KEY_CACHE:
362
337
  case HA_EXTRA_NO_KEY_CACHE:
363
338
  default: