summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
authorunknown <istruewing@blade08.mysql.com>2007-03-13 17:55:04 +0100
committerunknown <istruewing@blade08.mysql.com>2007-03-13 17:55:04 +0100
commitcf49765106d2bcb872ba8de38b98b13c5fe0accb (patch)
tree8627c78546c352cb640425ffe682ecd1a9ac5550 /storage/myisam
parent6095508b71e24de8bd804258d84d97df52fdfcab (diff)
parentcc9f55767f22848396591ff7eaa4453799be9347 (diff)
downloadmariadb-git-cf49765106d2bcb872ba8de38b98b13c5fe0accb.tar.gz
Merge istruewing@bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into blade08.mysql.com:/data0/istruewing/autopush/mysql-5.1-bug25460
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/mi_extra.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/storage/myisam/mi_extra.c b/storage/myisam/mi_extra.c
index ae584b06173..729174b6f88 100644
--- a/storage/myisam/mi_extra.c
+++ b/storage/myisam/mi_extra.c
@@ -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))
{