List:Commits« Previous MessageNext Message »
From:msvensson Date:March 24 2006 11:33am
Subject:bk commit into 5.1 tree (msvensson:1.2219)
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.2219 06/03/24 12:33:11 msvensson@neptunus.(none) +11 -0
  Merge 192.168.0.100:mysql/mysql-5.0
  into  neptunus.(none):/home/msvensson/mysql/mysql-5.1

  strings/ctype-ucs2.c
    1.60 06/03/24 12:33:05 msvensson@neptunus.(none) +0 -0
    Auto merged

  strings/ctype-gb2312.c
    1.65 06/03/24 12:33:05 msvensson@neptunus.(none) +0 -0
    Auto merged

  strings/ctype-euc_kr.c
    1.68 06/03/24 12:33:05 msvensson@neptunus.(none) +0 -0
    Auto merged

  strings/ctype-bin.c
    1.70 06/03/24 12:33:04 msvensson@neptunus.(none) +0 -0
    Auto merged

  sql/opt_range.cc
    1.206 06/03/24 12:33:04 msvensson@neptunus.(none) +0 -0
    Auto merged

  sql/item_func.cc
    1.281 06/03/24 12:33:04 msvensson@neptunus.(none) +0 -0
    Auto merged

  mysql-test/r/subselect.result
    1.139 06/03/24 12:33:04 msvensson@neptunus.(none) +0 -0
    Auto merged

  mysql-test/mysql-test-run.pl
    1.93 06/03/24 12:33:04 msvensson@neptunus.(none) +0 -0
    Auto merged

  include/m_ctype.h
    1.122 06/03/24 12:33:04 msvensson@neptunus.(none) +0 -0
    Auto merged

  include/config-win.h
    1.84 06/03/24 12:33:04 msvensson@neptunus.(none) +0 -0
    Auto merged

  client/mysqltest.c
    1.200 06/03/24 12:33:04 msvensson@neptunus.(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:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-5.1/RESYNC

--- 1.83/include/config-win.h	2006-03-16 14:28:18 +01:00
+++ 1.84/include/config-win.h	2006-03-24 12:33:04 +01:00
@@ -422,8 +422,15 @@
 
 #define shared_memory_buffer_length 16000
 #define default_shared_memory_base_name "MYSQL"
+
+#ifdef CYBOZU
+#define MYSQL_DEFAULT_CHARSET_NAME "utf8"
+#define MYSQL_DEFAULT_COLLATION_NAME "utf8_general_cs"
+#define HAVE_UTF8_GENERAL_CS 1
+#else
 #define MYSQL_DEFAULT_CHARSET_NAME "latin1"
 #define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
+#endif
 
 #define HAVE_SPATIAL 1
 #define HAVE_RTREE_KEYS 1
@@ -435,8 +442,10 @@
 /* Define charsets you want */
 /* #undef HAVE_CHARSET_armscii8 */
 /* #undef HAVE_CHARSET_ascii */
+#ifndef CYBOZU
 #define HAVE_CHARSET_big5 1
 #define HAVE_CHARSET_cp1250 1
+#endif
 /* #undef HAVE_CHARSET_cp1251 */
 /* #undef HAVE_CHARSET_cp1256 */
 /* #undef HAVE_CHARSET_cp1257 */
@@ -445,27 +454,33 @@
 /* #undef HAVE_CHARSET_cp866 */
 #define HAVE_CHARSET_cp932 1
 /* #undef HAVE_CHARSET_dec8 */
+#ifndef CYBOZU
 #define HAVE_CHARSET_eucjpms 1
 #define HAVE_CHARSET_euckr 1
 #define HAVE_CHARSET_gb2312 1
 #define HAVE_CHARSET_gbk 1
+#endif
 /* #undef HAVE_CHARSET_greek */
 /* #undef HAVE_CHARSET_hebrew */
 /* #undef HAVE_CHARSET_hp8 */
 /* #undef HAVE_CHARSET_keybcs2 */
 /* #undef HAVE_CHARSET_koi8r */
 /* #undef HAVE_CHARSET_koi8u */
+#ifndef CYBOZU
 #define HAVE_CHARSET_latin1 1
 #define HAVE_CHARSET_latin2 1
+#endif
 /* #undef HAVE_CHARSET_latin5 */
 /* #undef HAVE_CHARSET_latin7 */
 /* #undef HAVE_CHARSET_macce */
 /* #undef HAVE_CHARSET_macroman */
 #define HAVE_CHARSET_sjis 1
 /* #undef HAVE_CHARSET_swe7 */
+#ifndef CYBOZU
 #define HAVE_CHARSET_tis620 1
 #define HAVE_CHARSET_ucs2 1
 #define HAVE_CHARSET_ujis 1
+#endif
 #define HAVE_CHARSET_utf8 1
 #define HAVE_UCA_COLLATIONS 1
 

--- 1.205/sql/opt_range.cc	2006-03-13 14:42:38 +01:00
+++ 1.206/sql/opt_range.cc	2006-03-24 12:33:04 +01:00
@@ -4799,9 +4799,18 @@
   /* Here when simple cond */
   if (cond->const_item())
   {
-    if (cond->val_int())
-      DBUG_RETURN(new SEL_TREE(SEL_TREE::ALWAYS));
-    DBUG_RETURN(new SEL_TREE(SEL_TREE::IMPOSSIBLE));
+    /*
+      During the cond->val_int() evaluation we can come across a subselect 
+      item which may allocate memory on the thd->mem_root and assumes 
+      all the memory allocated has the same life span as the subselect 
+      item itself. So we have to restore the thread's mem_root here.
+    */
+    MEM_ROOT *tmp_root= param->mem_root;
+    param->thd->mem_root= param->old_root;
+    tree= cond->val_int() ? new(tmp_root) SEL_TREE(SEL_TREE::ALWAYS) :
+                            new(tmp_root) SEL_TREE(SEL_TREE::IMPOSSIBLE);
+    param->thd->mem_root= tmp_root;
+    DBUG_RETURN(tree);
   }
 
   table_map ref_tables= 0;

--- 1.138/mysql-test/r/subselect.result	2006-03-16 13:23:20 +01:00
+++ 1.139/mysql-test/r/subselect.result	2006-03-24 12:33:04 +01:00
@@ -3163,3 +3163,9 @@
 crash1
 crash1
 drop table t1;
+create table t1 (c int, key(c));
+insert into t1 values (1142477582), (1142455969);
+create table t2 (a int, b int);
+insert into t2 values (2, 1), (1, 0);
+delete from t1 where c <= 1140006215 and (select b from t2 where a = 2) = 1;
+drop table t1, t2;

--- 1.92/mysql-test/mysql-test-run.pl	2006-03-23 18:13:56 +01:00
+++ 1.93/mysql-test/mysql-test-run.pl	2006-03-24 12:33:04 +01:00
@@ -2786,11 +2786,11 @@
 
   if ( $opt_gdb || $opt_manual_gdb)
   {
-    gdb_arguments(\$args, \$exe, $type);
+    gdb_arguments(\$args, \$exe, "$type"."_$idx");
   }
   elsif ( $opt_ddd || $opt_manual_ddd )
   {
-    ddd_arguments(\$args, \$exe, $type);
+    ddd_arguments(\$args, \$exe, "$type"."_$idx");
   }
   elsif ( $opt_manual_debug )
   {
@@ -3325,9 +3325,10 @@
     ddd_arguments(\$args, \$exe, "client");
   }
 
-  if ($glob_use_libtool)
+  if ($glob_use_libtool and $opt_valgrind)
   {
     # Add "libtool --mode-execute" before the test to execute
+    # if running in valgrind(to avoid valgrinding bash)
     unshift(@$args, "--mode=execute", $exe);
     $exe= "libtool";
   }
@@ -3361,6 +3362,9 @@
   my $str= join(" ", @$$args);
   my $gdb_init_file= "$opt_tmpdir/gdbinit.$type";
 
+  # Remove the old gdbinit file
+  unlink($gdb_init_file);
+
   if ( $type eq "client" )
   {
     # write init file for client
@@ -3382,7 +3386,7 @@
 
   if ( $opt_manual_gdb )
   {
-     print "\nTo start gdb for$type, type in another window:\n";
+     print "\nTo start gdb for $type, type in another window:\n";
      print "cd $glob_mysql_test_dir;\n";
      print "gdb -x $gdb_init_file $$exe\n";
 
@@ -3422,6 +3426,9 @@
   my $str= join(" ", @$$args);
   my $gdb_init_file= "$opt_tmpdir/gdbinit.$type";
 
+  # Remove the old gdbinit file
+  unlink($gdb_init_file);
+
   if ( $type eq "client" )
   {
     # write init file for client
@@ -3444,7 +3451,7 @@
 
   if ( $opt_manual_ddd )
   {
-     print "\nTo start ddd for$type, type in another window:\n";
+     print "\nTo start ddd for $type, type in another window:\n";
      print "cd $glob_mysql_test_dir;\n";
      print "ddd -x $gdb_init_file $$exe\n";
 

--- 1.199/client/mysqltest.c	2006-03-23 18:08:42 +01:00
+++ 1.200/client/mysqltest.c	2006-03-24 12:33:04 +01:00
@@ -463,6 +463,7 @@
 static void var_free(void* v);
 
 void dump_result_to_reject_file(const char *record_file, char *buf, int size);
+void dump_result_to_log_file(const char *record_file, char *buf, int size);
 
 int close_connection(struct st_query*);
 static void set_charset(struct st_query*);
@@ -671,9 +672,9 @@
   }
   va_end(args);
 
-  /* Dump the result that has been accumulated so far to reject file */
+  /* Dump the result that has been accumulated so far to .log file */
   if (result_file && ds_res.length)
-    dump_result_to_reject_file(result_file, ds_res.str, ds_res.length);
+    dump_result_to_log_file(result_file, ds_res.str, ds_res.length);
 
   /* Clean up and exit */
   free_used_memory();
@@ -3498,6 +3499,12 @@
 {
   char reject_file[FN_REFLEN];
   str_to_file(fn_format(reject_file, record_file,"",".reject",2), buf, size);
+}
+
+void dump_result_to_log_file(const char *record_file, char *buf, int size)
+{
+  char log_file[FN_REFLEN];
+  str_to_file(fn_format(log_file, record_file,"",".log",2), buf, size);
 }
 
 static void check_regerr(my_regex_t* r, int err)
Thread
bk commit into 5.1 tree (msvensson:1.2219)msvensson24 Mar