Commit d139d19a authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines

into  mockturtle.local:/home/dlenev/src/mysql-5.1-bg25966

parents 7304af7b c096e178
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -350,11 +350,13 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
#ifdef HAVE_MMAP
    pthread_mutex_lock(&share->intern_lock);
    /*
      Memory map the data file if it is not already mapped and if there
      are no other threads using this table. intern_lock prevents other
      threads from starting to use the table while we are mapping it.
      Memory map the data file if it is not already mapped. It is safe
      to memory map a file while other threads are using file I/O on it.
      Assigning a new address to a function pointer is an atomic
      operation. intern_lock prevents that two or more mappings are done
      at the same time.
    */
    if (!share->file_map && (share->tot_locks == 1))
    if (!share->file_map)
    {
      if (mi_dynmap_file(info, share->state.state.data_file_length))
      {