Commit c68ba3e5 authored by unknown's avatar unknown

Merge chilla.local:/home/mydev/mysql-5.1--team

into  chilla.local:/home/mydev/mysql-5.1-bug25460
parents 62aadeb1 834ec588
......@@ -506,22 +506,6 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
share->data_file_type = DYNAMIC_RECORD;
my_afree((gptr) disk_cache);
mi_setup_functions(share);
if (open_flags & HA_OPEN_MMAP)
{
info.s= share;
if (mi_dynmap_file(&info, share->state.state.data_file_length))
{
/* purecov: begin inspected */
/* Ignore if mmap fails. Use file I/O instead. */
DBUG_PRINT("warning", ("mmap failed: errno: %d", errno));
/* purecov: end */
}
else
{
share->file_read= mi_mmap_pread;
share->file_write= mi_mmap_pwrite;
}
}
share->is_log_table= FALSE;
#ifdef THREAD
thr_lock_init(&share->lock);
......@@ -552,6 +536,14 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
}
}
#endif
/*
Memory mapping can only be requested after initializing intern_lock.
*/
if (open_flags & HA_OPEN_MMAP)
{
info.s= share;
mi_extra(&info, HA_EXTRA_MMAP, 0);
}
}
else
{
......
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