List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:March 13 2007 1:08pm
Subject:bk commit into 5.1 tree (svoj:1.2477)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of svoj. When svoj does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-03-13 17:08:11+04:00, svoj@april.(none) +1 -0
  Merge mysql.com:/home/svoj/devel/bk/mysql-5.1
  into  mysql.com:/home/svoj/devel/mysql/BUG26881/mysql-5.1-engines
  MERGE: 1.2409.75.5

  storage/myisam/mi_open.c@stripped, 2007-03-13 17:08:02+04:00, svoj@april.(none) +0 -2
    Use local.
    MERGE: 1.116.1.2

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	svoj
# Host:	april.(none)
# Root:	/home/svoj/devel/mysql/BUG26881/mysql-5.1-engines/RESYNC

--- 1.120/storage/myisam/mi_open.c	2007-03-13 17:08:18 +04:00
+++ 1.121/storage/myisam/mi_open.c	2007-03-13 17:08:18 +04:00
@@ -506,24 +506,6 @@ MI_INFO *mi_open(const char *name, int m
       share->data_file_type = DYNAMIC_RECORD;
     my_afree((gptr) disk_cache);
     mi_setup_functions(share);
-#ifdef HAVE_MMAP
-    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;
-      }
-    }
-#endif /* HAVE_MMAP */
     share->is_log_table= FALSE;
 #ifdef THREAD
     thr_lock_init(&share->lock);
@@ -554,6 +536,14 @@ MI_INFO *mi_open(const char *name, int m
       }
     }
 #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
   {
Thread
bk commit into 5.1 tree (svoj:1.2477)Sergey Vojtovich13 Mar