List:Commits« Previous MessageNext Message »
From:Tatjana Azundris Nuernberg Date:May 26 2011 11:17am
Subject:bzr commit into mysql-5.5 branch (tatjana.nuernberg:3390)
View as plain text  
#At file:///Users/tnurnberg/forest/11745920/55-11745920/ based on revid:tatjana.nuernberg@stripped

 3390 Tatjana Azundris Nuernberg	2011-05-26 [merge]
      auto-merge

    added:
      mysql-test/suite/binlog/r/binlog_reset_master.result
      mysql-test/suite/binlog/t/binlog_reset_master.test
      mysql-test/suite/rpl/t/rpl_typeconv-master.opt
    modified:
      BUILD/SETUP.sh
      cmake/configure.pl
      cmake/os/WindowsCache.cmake
      mysql-test/lib/mtr_cases.pm
      mysql-test/lib/mtr_misc.pl
      mysql-test/mysql-test-run.pl
      mysql-test/r/func_math.result
      mysql-test/t/func_math.test
      sql/item_func.cc
      sql/log.cc
      sql/mysqld.cc
=== modified file 'BUILD/SETUP.sh'
--- a/BUILD/SETUP.sh	2011-05-06 09:20:01 +0000
+++ b/BUILD/SETUP.sh	2011-05-25 10:39:11 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (C) 2000, 2007 MySQL AB
+# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Library General Public
@@ -250,7 +250,7 @@ gcov_compile_flags="$gcov_compile_flags 
 
 gcov_link_flags="-fprofile-arcs -ftest-coverage"
 
-gcov_configs="--disable-shared"
+gcov_configs="--with-gcov"
 
 # gprof
 

=== modified file 'cmake/configure.pl'
--- a/cmake/configure.pl	2010-11-12 01:33:19 +0000
+++ b/cmake/configure.pl	2011-05-25 10:39:11 +0000
@@ -190,6 +190,11 @@ foreach my $option (@ARGV)
     $cmakeargs = $cmakeargs." \"-DWITH_COMMENT=".substr($option,13)."\""; 
     next;
   }
+  if ($option =~ /with-gcov/)
+  {
+      $cmakeargs = $cmakeargs." -DENABLE_GCOV=ON"; 
+      next;
+  }
 
   $option = uc($option);
   $option =~ s/-/_/g;

=== modified file 'cmake/os/WindowsCache.cmake'
--- a/cmake/os/WindowsCache.cmake	2011-04-30 05:24:38 +0000
+++ b/cmake/os/WindowsCache.cmake	2011-05-26 07:54:19 +0000
@@ -341,6 +341,7 @@ SET(SIGNAL_RETURN_TYPE_IS_VOID 1 CACHE I
 SET(C_HAS_inline CACHE INTERNAL "")
 SET(C_HAS___inline 1 CACHE INTERNAL "")
 SET(FIONREAD_IN_SYS_IOCTL CACHE INTERNAL "")
+SET(FIONREAD_IN_SYS_FILIO CACHE INTERNAL "")
 SET(GWINSZ_IN_SYS_IOCTL CACHE INTERNAL "")
 SET(HAVE_CXXABI_H CACHE INTERNAL "")
 SET(HAVE_NDIR_H CACHE INTERNAL "")

=== modified file 'mysql-test/lib/mtr_cases.pm'
--- a/mysql-test/lib/mtr_cases.pm	2011-01-18 10:21:37 +0000
+++ b/mysql-test/lib/mtr_cases.pm	2011-05-24 08:54:34 +0000
@@ -287,9 +287,11 @@ sub collect_one_suite($)
 			      "mysql-test/suite",
 			      "mysql-test",
 			      # Look in storage engine specific suite dirs
-			      "storage/*/mysql-test-suites"
+			      "storage/*/mtr",
+			      # Look in plugin specific suite dir
+			      "plugin/$suite/tests",
 			     ],
-			     [$suite]);
+			     [$suite, "mtr"]);
     }
     mtr_verbose("suitedir: $suitedir");
   }

=== modified file 'mysql-test/lib/mtr_misc.pl'
--- a/mysql-test/lib/mtr_misc.pl	2011-04-07 08:12:52 +0000
+++ b/mysql-test/lib/mtr_misc.pl	2011-05-25 08:58:33 +0000
@@ -31,6 +31,7 @@ sub mtr_script_exists(@);
 sub mtr_file_exists(@);
 sub mtr_exe_exists(@);
 sub mtr_exe_maybe_exists(@);
+sub mtr_compress_file($);
 sub mtr_milli_sleep($);
 sub start_timer($);
 sub has_expired($);
@@ -199,6 +200,40 @@ sub mtr_exe_exists (@) {
   }
 }
 
+#
+# Try to compress file using tools that might be available.
+# If zip/gzip is not available, just silently ignore.
+#
+
+sub mtr_compress_file ($) {
+  my ($filename)= @_;
+
+  mtr_error ("File to compress not found: $filename") unless -f $filename;
+
+  my $did_compress= 0;
+
+  if (IS_WINDOWS)
+  {
+    # Capture stderr
+    my $ziperr= `zip $filename.zip $filename 2>&1`;
+    if ($?) {
+      print "$ziperr\n" if $ziperr !~ /recognized as an internal or external/;
+    } else {
+      unlink($filename);
+      $did_compress=1;
+    }
+  }
+  else
+  {
+    my $gzres= system("gzip $filename");
+    $did_compress= ! $gzres;
+    if ($gzres && $gzres != -1) {
+      mtr_error ("Error: have gzip but it fails to compress core file");
+    }
+  }
+  mtr_print("Compressed file $filename") if $did_compress;
+}
+
 
 sub mtr_milli_sleep ($) {
   die "usage: mtr_milli_sleep(milliseconds)" unless @_ == 1;

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2011-05-12 13:19:59 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-05-25 14:07:16 +0000
@@ -263,7 +263,6 @@ my $opt_shutdown_timeout= $ENV{MTR_SHUTD
 my $opt_start_timeout   = $ENV{MTR_START_TIMEOUT}    || 180; # seconds
 
 sub suite_timeout { return $opt_suite_timeout * 60; };
-sub check_timeout { return $opt_testcase_timeout * 6; };
 
 my $opt_wait_all;
 my $opt_user_args;
@@ -299,6 +298,8 @@ sub testcase_timeout ($) {
   return $opt_testcase_timeout * 60;
 }
 
+sub check_timeout ($) { return testcase_timeout($_[0]) / 10; }
+
 our $opt_warnings= 1;
 
 our $opt_include_ndbcluster= 0;
@@ -657,6 +658,8 @@ sub run_test_server ($$$) {
 			     mtr_report(" - deleting it, already saved",
 					"$opt_max_save_core");
 			     unlink("$core_file");
+			   } else {
+			     mtr_compress_file($core_file) unless @opt_cases;
 			   }
 			   ++$num_saved_cores;
 			 }
@@ -3413,7 +3416,7 @@ sub check_testcase($$)
   # Return immediately if no check proceess was started
   return 0 unless ( keys %started );
 
-  my $timeout= start_timer(check_timeout());
+  my $timeout= start_timer(check_timeout($tinfo));
 
   while (1){
     my $result;
@@ -3485,7 +3488,7 @@ test case was executed:\n";
     }
     elsif ( $proc->{timeout} ) {
       $tinfo->{comment}.= "Timeout for 'check-testcase' expired after "
-	.check_timeout()." seconds";
+	.check_timeout($tinfo)." seconds";
       $result= 4;
     }
     else {
@@ -3575,7 +3578,7 @@ sub run_on_all($$)
   # Return immediately if no check proceess was started
   return 0 unless ( keys %started );
 
-  my $timeout= start_timer(check_timeout());
+  my $timeout= start_timer(check_timeout($tinfo));
 
   while (1){
     my $result;
@@ -3606,7 +3609,7 @@ sub run_on_all($$)
     }
     elsif ($proc->{timeout}) {
       $tinfo->{comment}.= "Timeout for '$run' expired after "
-	.check_timeout()." seconds";
+	.check_timeout($tinfo)." seconds";
     }
     else {
       # Unknown process returned, most likley a crash, abort everything
@@ -4331,7 +4334,7 @@ sub check_warnings ($) {
   # Return immediately if no check proceess was started
   return 0 unless ( keys %started );
 
-  my $timeout= start_timer(check_timeout());
+  my $timeout= start_timer(check_timeout($tinfo));
 
   while (1){
     my $result= 0;
@@ -4383,7 +4386,7 @@ sub check_warnings ($) {
     }
     elsif ( $proc->{timeout} ) {
       $tinfo->{comment}.= "Timeout for 'check warnings' expired after "
-	.check_timeout()." seconds";
+	.check_timeout($tinfo)." seconds";
       $result= 4;
     }
     else {

=== modified file 'mysql-test/r/func_math.result'
--- a/mysql-test/r/func_math.result	2011-04-20 07:52:40 +0000
+++ b/mysql-test/r/func_math.result	2011-05-26 10:09:25 +0000
@@ -543,6 +543,12 @@ ROUND(LEAST(15, -4939092, 0.2704), STDDE
 -4939092.0000
 Warnings:
 Warning	1292	Truncated incorrect DOUBLE value: 'a'
+#
+# Bug#12392636  ASSERTION FAILED: SCALE >= 0 && PRECISION > 0 && SCALE <= PRECISION
+#
+SELECT SUM(DISTINCT (TRUNCATE((.1), NULL)));
+SUM(DISTINCT (TRUNCATE((.1), NULL)))
+NULL
 End of 5.1 tests
 #
 # Bug #8433: Overflow must be an error

=== added file 'mysql-test/suite/binlog/r/binlog_reset_master.result'
--- a/mysql-test/suite/binlog/r/binlog_reset_master.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/binlog/r/binlog_reset_master.result	2011-05-26 10:50:43 +0000
@@ -0,0 +1 @@
+RESET MASTER;

=== added file 'mysql-test/suite/binlog/t/binlog_reset_master.test'
--- a/mysql-test/suite/binlog/t/binlog_reset_master.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/binlog/t/binlog_reset_master.test	2011-05-26 10:50:43 +0000
@@ -0,0 +1,26 @@
+# ==== Purpose ====
+#
+# Test bugs in RESET MASTER.
+
+--source include/have_debug.inc
+--source include/have_log_bin.inc
+
+#######################################################################
+# BUG#12574820: binlog.binlog_tmp_table timing out in daily and weekly trunk run
+# Problem: MYSQL_BIN_LOG::reset_logs acquired LOCK_thread_count and
+# LOCK_log in the wrong order. This could cause a deadlock when
+# RESET MASTER was run concurrently with a disconnecting thread.
+#######################################################################
+
+# We use sleep, not debug_sync, because the sync point needs to be in
+# the thread shut down code after the debug sync facility has been
+# shut down.
+--let $write_var= SET DEBUG="+d,sleep_after_lock_thread_count_before_delete_thd"; CREATE TEMPORARY TABLE test.t1 (a INT);
+--let $write_to_file= GENERATE
+--disable_query_log
+--source include/write_var_to_file.inc
+--enable_query_log
+
+--exec $MYSQL < $write_to_file
+RESET MASTER;
+--remove_file $write_to_file

=== added file 'mysql-test/suite/rpl/t/rpl_typeconv-master.opt'
--- a/mysql-test/suite/rpl/t/rpl_typeconv-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_typeconv-master.opt	2011-05-25 14:39:39 +0000
@@ -0,0 +1 @@
+--testcase-timeout=40

=== modified file 'mysql-test/t/func_math.test'
--- a/mysql-test/t/func_math.test	2011-04-20 07:52:40 +0000
+++ b/mysql-test/t/func_math.test	2011-05-26 10:09:25 +0000
@@ -370,6 +370,12 @@ DROP TABLE t1;
 
 SELECT ROUND(LEAST(15, -4939092, 0.2704), STDDEV('a'));
 
+--echo #
+--echo # Bug#12392636  ASSERTION FAILED: SCALE >= 0 && PRECISION > 0 && SCALE <= PRECISION
+--echo #
+
+SELECT SUM(DISTINCT (TRUNCATE((.1), NULL)));
+
 --echo End of 5.1 tests
 
 --echo #

=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc	2011-05-21 08:59:32 +0000
+++ b/sql/item_func.cc	2011-05-26 10:09:25 +0000
@@ -2259,6 +2259,9 @@ void Item_func_round::fix_length_and_dec
   }
 
   val1= args[1]->val_int();
+  if ((null_value= args[1]->is_null()))
+    return;
+
   val1_unsigned= args[1]->unsigned_flag;
   if (val1 < 0)
     decimals_to_set= val1_unsigned ? INT_MAX : 0;

=== modified file 'sql/log.cc'
--- a/sql/log.cc	2011-05-12 18:35:31 +0000
+++ b/sql/log.cc	2011-05-26 10:56:17 +0000
@@ -3372,12 +3372,6 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
   DBUG_ENTER("reset_logs");
 
   ha_reset_logs(thd);
-  /*
-    We need to get both locks to be sure that no one is trying to
-    write to the index log file.
-  */
-  mysql_mutex_lock(&LOCK_log);
-  mysql_mutex_lock(&LOCK_index);
 
   /*
     The following mutex is needed to ensure that no threads call
@@ -3387,6 +3381,13 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
   */
   mysql_mutex_lock(&LOCK_thread_count);
 
+  /*
+    We need to get both locks to be sure that no one is trying to
+    write to the index log file.
+  */
+  mysql_mutex_lock(&LOCK_log);
+  mysql_mutex_lock(&LOCK_index);
+
   /* Save variables so that we can reopen the log */
   save_name=name;
   name=0;					// Protect against free

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2011-05-25 10:17:27 +0000
+++ b/sql/mysqld.cc	2011-05-26 10:56:17 +0000
@@ -2070,6 +2070,12 @@ void unlink_thd(THD *thd)
   thd_cleanup(thd);
   dec_connection_count();
   mysql_mutex_lock(&LOCK_thread_count);
+  /*
+    Used by binlog_reset_master.  It would be cleaner to use
+    DEBUG_SYNC here, but that's not possible because the THD's debug
+    sync feature has been shut down at this point.
+  */
+  DBUG_EXECUTE_IF("sleep_after_lock_thread_count_before_delete_thd", sleep(5););
   delete_thd(thd);
   DBUG_VOID_RETURN;
 }

No bundle (reason: revision is a merge (you can force generation of a bundle with env var BZR_FORCE_BUNDLE=1)).
Thread
bzr commit into mysql-5.5 branch (tatjana.nuernberg:3390) Tatjana Azundris Nuernberg26 May