List:Commits« Previous MessageNext Message »
From:msvensson Date:April 6 2006 9:39am
Subject:bk commit into 5.1 tree (msvensson:1.2295)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson 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
  1.2295 06/04/06 11:38:50 msvensson@shellback.(none) +13 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
  into  shellback.(none):/home/msvensson/mysql/mysql-5.1

  storage/csv/ha_tina.cc
    1.40 06/04/06 11:38:42 msvensson@shellback.(none) +0 -0
    SCCS merged

  strings/ctype-ucs2.c
    1.62 06/04/06 11:36:08 msvensson@shellback.(none) +0 -0
    Auto merged

  strings/ctype-gb2312.c
    1.66 06/04/06 11:36:08 msvensson@shellback.(none) +0 -0
    Auto merged

  strings/ctype-euc_kr.c
    1.69 06/04/06 11:36:08 msvensson@shellback.(none) +0 -0
    Auto merged

  strings/ctype-bin.c
    1.71 06/04/06 11:36:08 msvensson@shellback.(none) +0 -0
    Auto merged

  storage/csv/ha_tina.h
    1.17 06/04/06 11:36:08 msvensson@shellback.(none) +0 -0
    Auto merged

  sql/opt_range.cc
    1.211 06/04/06 11:36:07 msvensson@shellback.(none) +0 -0
    Auto merged

  sql/item_func.cc
    1.283 06/04/06 11:36:07 msvensson@shellback.(none) +0 -0
    Auto merged

  mysql-test/r/subselect.result
    1.141 06/04/06 11:36:07 msvensson@shellback.(none) +0 -0
    Auto merged

  mysql-test/mysql-test-run.pl
    1.99 06/04/06 11:36:07 msvensson@shellback.(none) +0 -0
    Auto merged

  include/m_ctype.h
    1.123 06/04/06 11:36:06 msvensson@shellback.(none) +0 -0
    Auto merged

  include/config-win.h
    1.85 06/04/06 11:36:06 msvensson@shellback.(none) +0 -0
    Auto merged

  client/mysqltest.c
    1.203 06/04/06 11:36:06 msvensson@shellback.(none) +0 -0
    Auto merged

# 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:	msvensson
# Host:	shellback.(none)
# Root:	/home/msvensson/mysql/mysql-5.1/RESYNC

--- 1.39/storage/csv/ha_tina.cc	2006-03-30 05:11:30 +02:00
+++ 1.40/storage/csv/ha_tina.cc	2006-04-06 11:38:42 +02:00
@@ -49,7 +49,6 @@
 #include "mysql_priv.h"
 
 #include "ha_tina.h"
-#include <sys/mman.h>
 
 #include <mysql/plugin.h>
 
@@ -161,7 +160,7 @@
       share->mapped_file= (byte *)my_mmap(NULL, share->file_stat.st_size,
                                           PROT_READ, MAP_PRIVATE,
                                           share->data_file, 0);
-    if ((share->mapped_file ==(caddr_t)-1))
+    if ((share->mapped_file == MAP_FAILED))
     {
       /*
         Bad idea you think? See the problem is that nothing actually checks
@@ -499,7 +498,7 @@
   records_is_known(0)
 {
   /* Set our original buffers from pre-allocated memory */
-  buffer.set(byte_buffer, IO_SIZE, system_charset_info);
+  buffer.set((char*)byte_buffer, IO_SIZE, system_charset_info);
   chain= chain_buffer;
 }
 
@@ -877,7 +876,8 @@
 
   size= encode_quote(buf);
 
-  if (my_write(share->data_file, buffer.ptr(), size, MYF(MY_WME | MY_NABP)))
+  if (my_write(share->data_file, (byte*)buffer.ptr(), size,
+               MYF(MY_WME | MY_NABP)))
     DBUG_RETURN(-1);
 
   /*
@@ -929,7 +929,8 @@
   if (chain_append())
     DBUG_RETURN(-1);
 
-  if (my_write(share->data_file, buffer.ptr(), size, MYF(MY_WME | MY_NABP)))
+  if (my_write(share->data_file, (byte*)buffer.ptr(), size,
+               MYF(MY_WME | MY_NABP)))
     DBUG_RETURN(-1);
 
   /* UPDATE should never happen on the log tables */
@@ -1130,7 +1131,7 @@
   if ((chain_ptr - chain)  > 0)
   {
     tina_set *ptr;
-    off_t length;
+    size_t length;
 
     /*
       Setting up writable map, this will contain all of the data after the
@@ -1154,15 +1155,16 @@
       length= length - (size_t)(ptr->end - ptr->begin);
     }
 
-    /* Truncate the file to the new size */
-    if (my_chsize(share->data_file, length, 0, MYF(MY_WME)))
+    /* Unmap the file before the new size is set */
+    if (my_munmap(share->mapped_file, share->file_stat.st_size))
       DBUG_RETURN(-1);
+    /* We set it to null so that get_mmap() won't try to unmap it */
+    share->mapped_file= NULL;
 
-    if (my_munmap(share->mapped_file, length))
+    /* Set the file to the new size */
+    if (my_chsize(share->data_file, length, 0, MYF(MY_WME)))
       DBUG_RETURN(-1);
 
-    /* We set it to null so that get_mmap() won't try to unmap it */
-    share->mapped_file= NULL;
     if (get_mmap(share, 0) > 0)
       DBUG_RETURN(-1);
   }
@@ -1281,6 +1283,13 @@
   if (!records_is_known)
     DBUG_RETURN(my_errno=HA_ERR_WRONG_COMMAND);
 
+  /* Unmap the file before the new size is set */
+  if (share->mapped_file && my_munmap(share->mapped_file,
+                                      share->file_stat.st_size))
+    DBUG_RETURN(-1);
+  share->mapped_file= NULL;
+
+  /* Truncate the file to zero size */
   rc= my_chsize(share->data_file, 0, 0, MYF(MY_WME));
 
   if (get_mmap(share, 0) > 0)

--- 1.16/storage/csv/ha_tina.h	2006-03-29 04:28:50 +02:00
+++ 1.17/storage/csv/ha_tina.h	2006-04-06 11:36:08 +02:00
@@ -51,9 +51,9 @@
   ha_rows rows_recorded;    /* Number of rows in tables */
 } TINA_SHARE;
 
-typedef struct tina_set {
-	off_t begin;
-	off_t end;
+struct tina_set {
+  off_t begin;
+  off_t end;
 };
 
 class ha_tina: public handler

--- 1.98/mysql-test/mysql-test-run.pl	2006-04-04 20:25:22 +02:00
+++ 1.99/mysql-test/mysql-test-run.pl	2006-04-06 11:36:07 +02:00
@@ -230,6 +230,8 @@
 our $opt_manual_gdb;
 our $opt_manual_ddd;
 our $opt_manual_debug;
+our $opt_debugger;
+our $opt_client_debugger;
 
 our $opt_gprof;
 our $opt_gprof_dir;
@@ -633,6 +635,8 @@
              'manual-debug'             => \$opt_manual_debug,
              'ddd'                      => \$opt_ddd,
              'client-ddd'               => \$opt_client_ddd,
+	     'debugger=s'               => \$opt_debugger,
+	     'client-debugger=s'        => \$opt_client_debugger,
              'strace-client'            => \$opt_strace_client,
              'master-binary=s'          => \$exe_master_mysqld,
              'slave-binary=s'           => \$exe_slave_mysqld,
@@ -812,9 +816,10 @@
 
   # Check debug related options
   if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd ||
-       $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug)
+       $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug ||
+       $opt_debugger || $opt_client_debugger )
   {
-    # Indicate that we are using debugger 
+    # Indicate that we are using debugger
     $glob_debugger= 1;
     # Increase timeouts
     $opt_wait_timeout=  300;
@@ -2798,6 +2803,10 @@
   {
     ddd_arguments(\$args, \$exe, "$type"."_$idx");
   }
+  elsif ( $opt_debugger )
+  {
+    debugger_arguments(\$args, \$exe, "$type"."_$idx");
+  }
   elsif ( $opt_manual_debug )
   {
      print "\nStart $type in your debugger\n" .
@@ -3324,6 +3333,10 @@
   {
     ddd_arguments(\$args, \$exe, "client");
   }
+  elsif ( $opt_client_debugger )
+  {
+    debugger_arguments(\$args, \$exe, "client");
+  }
 
   if ($glob_use_libtool and $opt_valgrind)
   {
@@ -3476,6 +3489,42 @@
   mtr_add_arg($$args, "$save_exe");
 }
 
+
+#
+# Modify the exe and args so that program is run in the selected debugger
+#
+sub debugger_arguments {
+  my $args= shift;
+  my $exe=  shift;
+  my $debugger= $opt_debugger || $opt_client_debugger;
+
+  if ( $debugger eq "vcexpress" or $debugger eq "vc")
+  {
+    # vc[express] /debugexe exe arg1 .. argn
+
+    # Add /debugexe and name of the exe before args
+    unshift(@$$args, "/debugexe");
+    unshift(@$$args, "$$exe");
+
+  }
+  elsif ( $debugger eq "windbg" )
+  {
+    # windbg exe arg1 .. argn
+
+    # Add name of the exe before args
+    unshift(@$$args, "$$exe");
+
+  }
+  else
+  {
+    mtr_error("Unknown argument \"$debugger\" passed to --debugger");
+  }
+
+  # Set exe to debuggername
+  $$exe= $debugger;
+}
+
+
 #
 # Modify the exe and args so that program is run in valgrind
 #
@@ -3588,6 +3637,8 @@
   client-gdb            Start mysqltest client in gdb
   ddd                   Start mysqld in ddd
   client-ddd            Start mysqltest client in ddd
+  debugger=NAME         Start mysqld in the selected debugger
+  client-debugger=NAME  Start mysqltest in the selected debugger
   strace-client         FIXME
   master-binary=PATH    Specify the master "mysqld" to use
   slave-binary=PATH     Specify the slave "mysqld" to use
Thread
bk commit into 5.1 tree (msvensson:1.2295)msvensson6 Apr