~mdcallag/+junk/5.1-map

« back to all changes in this revision

Viewing changes to storage/myisam/mi_extra.c

  • Committer: msvensson at pilot
  • Date: 2007-04-24 09:11:45 UTC
  • mfrom: (2469.1.106)
  • Revision ID: sp1r-msvensson@pilot.blaudden-20070424091145-10463
Merge pilot.blaudden:/home/msvensson/mysql/my51-m-mysql_upgrade
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint

Show diffs side-by-side

added added

removed removed

Lines of Context:
350
350
#ifdef HAVE_MMAP
351
351
    pthread_mutex_lock(&share->intern_lock);
352
352
    /*
353
 
      Memory map the data file if it is not already mapped and if there
354
 
      are no other threads using this table. intern_lock prevents other
355
 
      threads from starting to use the table while we are mapping it.
 
353
      Memory map the data file if it is not already mapped. It is safe
 
354
      to memory map a file while other threads are using file I/O on it.
 
355
      Assigning a new address to a function pointer is an atomic
 
356
      operation. intern_lock prevents that two or more mappings are done
 
357
      at the same time.
356
358
    */
357
 
    if (!share->file_map && (share->tot_locks == 1))
 
359
    if (!share->file_map)
358
360
    {
359
361
      if (mi_dynmap_file(info, share->state.state.data_file_length))
360
362
      {