List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:May 25 2011 10:47am
Subject:bzr push into mysql-5.5-mtr branch (bjorn.munch:3217 to 3219) Bug#12586211
View as plain text  
 3219 Bjorn Munch	2011-05-25
      Bug #12586211 ENABLE GCOV BUILDS WITH CMAKE, INCLUDING PLUGINS
      Added --with-gcov option to configure.pl and use that from SETUP.sh

    modified:
      BUILD/SETUP.sh
      cmake/configure.pl
 3218 Bjorn Munch	2011-05-25
      Bug #11750043 40340: USE GZIPPED CORE FILES TO SAVE SPACE
      Use [g]zip on core file if available, ignore if not
      Skip if running named test, and print a line saying what it compressed.

    modified:
      mysql-test/lib/mtr_misc.pl
      mysql-test/mysql-test-run.pl
 3217 Bjorn Munch	2011-05-24 [merge]
      merge from 5.5 main

    modified:
      include/my_getopt.h
      mysql-test/collections/default.experimental
      mysql-test/suite/binlog/t/disabled.def
      mysql-test/suite/federated/disabled.def
      mysql-test/suite/rpl/t/disabled.def
      mysql-test/suite/sys_vars/t/disabled.def
      mysql-test/t/disabled.def
      sql/derror.cc
      sql/events.cc
      sql/field.cc
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster_binlog.cc
      sql/ha_partition.cc
      sql/handler.cc
      sql/item_create.cc
      sql/item_func.cc
      sql/item_strfunc.cc
      sql/log.h
      sql/log_event.cc
      sql/rpl_rli.cc
      sql/set_var.cc
      sql/sp_head.cc
      sql/sql_acl.cc
      sql/sql_base.cc
      sql/sql_binlog.cc
      sql/sql_class.cc
      sql/sql_connect.cc
      sql/sql_insert.cc
      sql/sql_parse.cc
      sql/sql_partition.cc
      sql/sql_plugin.cc
      sql/sql_prepare.cc
      sql/sql_reload.cc
      sql/sql_repl.cc
      sql/sql_show.cc
      sql/sql_table.cc
      sql/sys_vars.cc
      sql/table.cc
      sql/unireg.cc
      storage/example/ha_example.cc
      storage/innobase/btr/btr0cur.c
      storage/innobase/buf/buf0buf.c
      storage/innobase/dict/dict0crea.c
      storage/innobase/dict/dict0load.c
      storage/innobase/fil/fil0fil.c
      storage/innobase/include/buf0buf.h
      storage/innobase/include/dict0load.h
      storage/innobase/include/page0page.h
      storage/innobase/include/page0page.ic
      storage/innobase/os/os0file.c
      storage/innobase/page/page0page.c
      storage/innobase/row/row0mysql.c
      storage/innobase/trx/trx0undo.c
=== 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 '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 08:58:33 +0000
@@ -657,6 +657,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;
 			 }

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-mtr branch (bjorn.munch:3217 to 3219) Bug#12586211Bjorn Munch25 May