Commit d3b7fce8 authored by istruewing@blade08.mysql.com's avatar istruewing@blade08.mysql.com

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

into  blade08.mysql.com:/data0/istruewing/autopush/mysql-5.1-bug25460
parents 31329c83 67d97254
...@@ -350,11 +350,13 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) ...@@ -350,11 +350,13 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg)
#ifdef HAVE_MMAP #ifdef HAVE_MMAP
pthread_mutex_lock(&share->intern_lock); pthread_mutex_lock(&share->intern_lock);
/* /*
Memory map the data file if it is not already mapped and if there Memory map the data file if it is not already mapped. It is safe
are no other threads using this table. intern_lock prevents other to memory map a file while other threads are using file I/O on it.
threads from starting to use the table while we are mapping 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)) if (mi_dynmap_file(info, share->state.state.data_file_length))
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment