List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:April 16 2011 4:15pm
Subject:bzr push into mysql-5.5 branch (bjorn.munch:3450 to 3452)
View as plain text  
 3452 Bjorn Munch	2011-04-16 [merge]
      null upmerge

 3451 Bjorn Munch	2011-04-16 [merge]
      merge from 5.5-mtr

    modified:
      mysql-test/lib/My/Find.pm
      mysql-test/lib/mtr_gcov.pl
      mysql-test/mysql-test-run.pl
 3450 Alexander Nozdrin	2011-04-15
      A patch for Bug#11763166 (55847: SHOW WARNINGS returns empty
      result set when SQLEXCEPTION is active.
      
      The problem was in a hackish THD::no_warnings_for_error attribute.
      When it was set, an error was not written to Warning_info -- only
      Diagnostics_area state was changed. That means, Diagnostics_area
      might contain error state, which is not present in Warning_info.
      
      The user-visible problem was that in some cases SHOW WARNINGS
      returned empty result set (i.e. there were no warnings) while
      the previous SQL statement failed. According to the MySQL
      protocol errors must be presented in warning list.
      
      The main idea of this patch is to remove THD::no_warnings_for_error.
      There were few places where it was used:
        - sql_admin.cc, handling of REPAIR TABLE USE_FRM.
        - sql_show.cc, when calling fill_schema_table_from_frm().
        - sql_show.cc, when calling fill_table().
      The fix is to either use internal-error-handlers, or to use
      temporary Warning_info storing warnings, which might be ignored.
      
      This patch is needed to fix Bug 11763162 (55843).

    modified:
      mysql-test/r/warnings.result
      mysql-test/t/warnings.test
      sql/sp_head.cc
      sql/sql_admin.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_error.cc
      sql/sql_error.h
      sql/sql_parse.cc
      sql/sql_prepare.cc
      sql/sql_show.cc
      sql/sql_trigger.cc
=== modified file 'mysql-test/lib/My/Find.pm'
--- a/mysql-test/lib/My/Find.pm	2011-02-24 14:11:05 +0000
+++ b/mysql-test/lib/My/Find.pm	2011-04-15 08:37:20 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2008 MySQL AB
+# Copyright (c) 2004, 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 General Public License as published by
@@ -156,8 +156,7 @@ sub my_find_paths {
   # User can select to look in a special build dir
   # which is a subdirectory of any of the paths
   my @extra_dirs;
-  my $build_dir= $::opt_config_dir || $ENV{MTR_VS_CONFIG}
-                                   || $ENV{MTR_BUILD_DIR};
+  my $build_dir= $::opt_vs_config || $ENV{MTR_VS_CONFIG} || $ENV{MTR_BUILD_DIR};
   push(@extra_dirs, $build_dir) if defined $build_dir;
 
   if (defined $extension){

=== modified file 'mysql-test/lib/mtr_gcov.pl'
--- a/mysql-test/lib/mtr_gcov.pl	2011-01-18 11:01:40 +0000
+++ b/mysql-test/lib/mtr_gcov.pl	2011-04-14 12:25:15 +0000
@@ -1,5 +1,5 @@
 # -*- cperl -*-
-# Copyright (C) 2004, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
+# Copyright (c) 2004, 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 General Public License as published by
@@ -31,7 +31,7 @@ sub gcov_prepare ($) {
 #
 # Collect gcov statistics.
 # Arguments:
-#   $dir       basedir, normally source directory
+#   $dir       basedir, normally build directory
 #   $gcov      gcov utility program [path] name
 #   $gcov_msg  message file name
 #   $gcov_err  error file name
@@ -43,29 +43,25 @@ sub gcov_collect ($$$) {
   my $start_dir= cwd();
 
   print "Collecting source coverage info using '$gcov'...\n";
-  -f "$start_dir/$gcov_msg" and unlink("$start_dir/$gcov_msg");
-  -f "$start_dir/$gcov_err" and unlink("$start_dir/$gcov_err");
+  -f "$dir/$gcov_msg" and unlink("$dir/$gcov_msg");
+  -f "$dir/$gcov_err" and unlink("$dir/$gcov_err");
 
   my @dirs= `find "$dir" -type d -print | sort`;
   #print "List of directories:\n@dirs\n";
 
   foreach my $d ( @dirs ) {
-    my $dir_reported= 0;
     chomp($d);
     chdir($d) or next;
 
-    foreach my $f ( (glob("*.h"), glob("*.cc"), glob("*.c")) ) {
-      $f =~ /(.*)\.[ch]c?/;
-      -f "$1.gcno" or next;
-      if (!$dir_reported) {
-	print "Collecting in '$d'...\n";
-	$dir_reported= 1;
-      }
-      system("$gcov $f 2>>$start_dir/$gcov_err >>$start_dir/$gcov_msg");
+    my @flist= glob("*.*.gcno");
+    print ("Collecting in '$d'...\n") if @flist;
+
+    foreach my $f (@flist) {
+      system("$gcov $f 2>>$dir/$gcov_err >>$dir/$gcov_msg");
     }
     chdir($start_dir);
   }
-  print "gcov info in $gcov_msg, errors in $gcov_err\n";
+  print "gcov info in $dir/$gcov_msg, errors in $dir/$gcov_err\n";
 }
 
 

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2011-04-07 08:12:52 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-04-15 08:37:20 +0000
@@ -210,8 +210,8 @@ our $opt_clean_vardir= $ENV{'MTR_CLEAN_V
 
 our $opt_gcov;
 our $opt_gcov_exe= "gcov";
-our $opt_gcov_err= "mysql-test-gcov.msg";
-our $opt_gcov_msg= "mysql-test-gcov.err";
+our $opt_gcov_err= "mysql-test-gcov.err";
+our $opt_gcov_msg= "mysql-test-gcov.msg";
 
 our $opt_gprof;
 our %gprof_dirs;
@@ -507,7 +507,7 @@ sub main {
   mtr_print_line();
 
   if ( $opt_gcov ) {
-    gcov_collect($basedir, $opt_gcov_exe,
+    gcov_collect($bindir, $opt_gcov_exe,
 		 $opt_gcov_msg, $opt_gcov_err);
   }
 
@@ -1198,7 +1198,7 @@ sub command_line_setup {
 	chomp;
 	# remove comments (# foo) at the beginning of the line, or after a 
 	# blank at the end of the line
-	s/( +|^)#.*$//;
+	s/(\s+|^)#.*$//;
 	# If @ platform specifier given, use this entry only if it contains
 	# @<platform> or @!<xxx> where xxx != platform
 	if (/\@.*/)
@@ -1209,8 +1209,8 @@ sub command_line_setup {
 	  s/\@.*$//;
 	}
 	# remove whitespace
-	s/^ +//;              
-	s/ +$//;
+	s/^\s+//;
+	s/\s+$//;
 	# if nothing left, don't need to remember this line
 	if ( $_ eq "" ) {
 	  next;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (bjorn.munch:3450 to 3452) Bjorn Munch16 Apr