List:Commits« Previous MessageNext Message »
From:Joerg Bruehe Date:January 17 2007 7:48pm
Subject:bk commit into 5.1 tree (joerg:1.2403)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of joerg. When joerg 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-01-17 20:47:53+01:00, joerg@trift2. +2 -0
  Merge trift2.:/MySQL/M50/upward-5.0
  into  trift2.:/MySQL/M51/push-5.1
  MERGE: 1.1810.2442.2

  configure.in@stripped, 2007-01-17 20:47:46+01:00, joerg@trift2. +0 -0
    Auto merged
    MERGE: 1.245.74.1

  storage/myisam/mi_packrec.c@stripped, 2007-01-17 20:47:47+01:00, joerg@trift2. +0 -0
    Auto merged
    MERGE: 1.30.11.2

  storage/myisam/mi_packrec.c@stripped, 2007-01-17 20:47:46+01:00, joerg@trift2. +0 -0
    Merge rename: myisam/mi_packrec.c -> storage/myisam/mi_packrec.c

# 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:	joerg
# Host:	trift2.
# Root:	/MySQL/M51/push-5.1/RESYNC

--- 1.415/configure.in	2007-01-17 20:48:04 +01:00
+++ 1.416/configure.in	2007-01-17 20:48:04 +01:00
@@ -2438,9 +2438,9 @@
 
 if test "$THREAD_SAFE_CLIENT" = "no"
 then
-  sql_client_dirs="strings regex mysys extra libmysql client"
+  sql_client_dirs="strings regex mysys dbug extra libmysql client"
 else
-  sql_client_dirs="strings regex mysys extra libmysql libmysql_r client"
+  sql_client_dirs="strings regex mysys dbug extra libmysql libmysql_r client"
   linked_client_targets="$linked_client_targets linked_libmysql_r_sources"
   AC_CONFIG_FILES(libmysql_r/Makefile)
   AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should the client be thread safe])

--- 1.30.11.1/myisam/mi_packrec.c	2007-01-17 20:48:04 +01:00
+++ 1.44/storage/myisam/mi_packrec.c	2007-01-17 20:48:04 +01:00
@@ -1482,56 +1482,33 @@
 static int _mi_read_mempack_record(MI_INFO *info,my_off_t filepos,byte *buf);
 static int _mi_read_rnd_mempack_record(MI_INFO*, byte *,my_off_t, my_bool);
 
-#ifndef MAP_NORESERVE
-#define MAP_NORESERVE 0		/* For irix */
-#endif
-#ifndef MAP_FAILED
-#define MAP_FAILED -1
-#endif
-
 my_bool _mi_memmap_file(MI_INFO *info)
 {
-  byte *file_map;
   MYISAM_SHARE *share=info->s;
   DBUG_ENTER("mi_memmap_file");
 
-  if (!share->file_map)
+  if (!info->s->file_map)
   {
-    my_off_t data_file_length= share->state.state.data_file_length;
-    if (data_file_length > (my_off_t) (~((size_t) 0)) - MEMMAP_EXTRA_MARGIN)
-    {
-      DBUG_PRINT("warning", ("File is too large for mmap"));
-      DBUG_RETURN(0);
-    }
     if (my_seek(info->dfile,0L,MY_SEEK_END,MYF(0)) <
-        data_file_length + MEMMAP_EXTRA_MARGIN)
+        share->state.state.data_file_length+MEMMAP_EXTRA_MARGIN)
     {
       DBUG_PRINT("warning",("File isn't extended for memmap"));
       DBUG_RETURN(0);
     }
-    file_map=(byte*)
-      my_mmap(0, (size_t) (data_file_length + MEMMAP_EXTRA_MARGIN), PROT_READ,
-              MAP_SHARED | MAP_NORESERVE, info->dfile, 0L);
-    if (file_map == (byte*) MAP_FAILED)
-    {
-      DBUG_PRINT("warning",("mmap failed: errno: %d",errno));
-      my_errno=errno;
+    if (mi_dynmap_file(info, share->state.state.data_file_length))
       DBUG_RETURN(0);
-    }
-    share->file_map= file_map;
   }
   info->opt_flag|= MEMMAP_USED;
-  info->read_record=share->read_record=_mi_read_mempack_record;
-  share->read_rnd=_mi_read_rnd_mempack_record;
+  info->read_record= share->read_record= _mi_read_mempack_record;
+  share->read_rnd= _mi_read_rnd_mempack_record;
   DBUG_RETURN(1);
 }
 
 
 void _mi_unmap_file(MI_INFO *info)
 {
-  VOID(my_munmap(info->s->file_map,
-	      (size_t) info->s->state.state.data_file_length+
-	      MEMMAP_EXTRA_MARGIN));
+  VOID(my_munmap(info->s->file_map, 
+                 (size_t) info->s->mmaped_length + MEMMAP_EXTRA_MARGIN));
 }
 
 
Thread
bk commit into 5.1 tree (joerg:1.2403)Joerg Bruehe17 Jan