List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:October 17 2012 12:11pm
Subject:bzr push into mysql-5.5-cluster-7.2 branch (magnus.blaudd:4033 to 4036)
View as plain text  
 4036 magnus.blaudd@stripped	2012-10-17
      Turn off build of NDB's Java components in
      BUILD/compile-dist

    modified:
      BUILD/compile-dist
 4035 magnus.blaudd@stripped	2012-10-17 [merge]
      Merge 7.1 -> 7.2

    modified:
      mysql-test/lib/My/Exec.pm
      mysql-test/suite/ndb/t/ndb_backup_rate.test
      storage/ndb/clusterj/clusterj-jdbc/src/test/java/jdbctest/JDBCQueryTest.java
      storage/ndb/clusterj/clusterj-tie/src/main/java/com/mysql/clusterj/tie/Utility.java
 4034 magnus.blaudd@stripped	2012-10-17
      Honour the MTR_BINDIR variable which is set by mtr
      in out of source builds and points to the build location

    modified:
      mysql-test/suite/ndb/include/have_clusterj.inc
      mysql-test/suite/ndb/include/have_clusterj_jpa.inc
      mysql-test/suite/ndb/include/have_ndb_rqg.inc
      mysql-test/suite/ndb/include/have_ndbjtie_junit.inc
      mysql-test/suite/ndb/include/ndb_info.inc
      mysql-test/suite/ndb/t/have_ndb_dist_priv.inc
      mysql-test/suite/ndb/t/have_ndbinfo.inc
 4033 magnus.blaudd@stripped	2012-10-16
      ndb
       - make it possible to set the default value to use for
         WITH_NDB_JAVA true the environment variable WITH_NDB_JAVA_DEFAULT
       - set WITH_NDB_JAVA default to ON

    modified:
      storage/ndb/CMakeLists.txt
=== modified file 'BUILD/compile-dist'
--- a/BUILD/compile-dist	2011-08-31 10:39:08 +0000
+++ b/BUILD/compile-dist	2012-10-17 12:10:00 +0000
@@ -74,6 +74,12 @@ then
   fi
 fi
 
+if test -z "$WITH_NDB_JAVA_DEFAULT" ; then
+  # Turn off build of NDB's Java components
+  export WITH_NDB_JAVA_DEFAULT
+  WITH_NDB_JAVA_DEFAULT=0
+fi
+
 # Make sure to enable all features that affect "make dist"
 # Remember that configure restricts the man pages to the configured features !
 ./configure \

=== modified file 'mysql-test/lib/My/Exec.pm'
--- a/mysql-test/lib/My/Exec.pm	2011-07-05 12:46:07 +0000
+++ b/mysql-test/lib/My/Exec.pm	2012-10-17 11:56:01 +0000
@@ -34,15 +34,23 @@ sub get_logfile_name {
     return $logfile_name;
 }
 
-# Save a set of lines to a file
-sub save_file {
-    my $filename = shift;
-    my $lines    = shift;
-
-    my $F = IO::File->new($filename, "w") or die "Can't write to '$filename': $!";
-    foreach my $line (@$lines) {
-        print $F $line
+# Show the last "max_lines" from file
+sub show_last_lines_from_file {
+    my ($filename, $max_lines) = @_;
+
+    my $F = IO::File->new($filename, "r")
+      or print "Failed to open file '$filename' for reading: $!\n" and return;
+
+    my @input = <$F>;
+    my $lines = scalar(@input);
+    $lines = $max_lines if $lines > $max_lines;
+    print "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n";
+    print "Last '$lines' lines of output from command:\n";
+    foreach my $line (splice(@input, -$lines))
+    {
+      print $line;
     }
+    print "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n";
     $F->close();
 }
 
@@ -66,10 +74,14 @@ sub exec_print_on_error {
 
     my $logfile_name = get_logfile_name($cmd);
 
-    $cmd .= " 2>&1";
-    my @output = `$cmd`;
-    print "Result of '$cmd': $?, logfile: '$logfile_name'\n";
-    save_file($logfile_name, \@output);
+    # Redirect stdout and stderr of command to log file
+    $cmd .= " > $logfile_name 2>&1";
+
+    # Execute command
+    print "Running '$cmd'\n";
+    system($cmd);
+
+    print "Result of '$cmd': $?\n";
     if ($? == 0)
     {
 	# Test program suceeded
@@ -91,14 +103,8 @@ sub exec_print_on_error {
 	print "Test program killed by signal $sig\n" if $sig;
 	print "Test program failed with error $return\n" if $return;
 
-	# Show the last lines of the output 
-	my $lines = scalar(@output);
-	$lines = $max_lines if $lines > $max_lines;
-	print "Last '$lines' lines of output from command:\n";  
-	foreach my $line (splice(@output, -$lines))
-	{
-	    print $line;
-	}
+	# Show the "max_lines" last lines from the log file
+	show_last_lines_from_file($logfile_name, $max_lines);
     }
     return 0;
 }

=== modified file 'mysql-test/suite/ndb/include/have_clusterj.inc'
--- a/mysql-test/suite/ndb/include/have_clusterj.inc	2011-10-24 12:45:30 +0000
+++ b/mysql-test/suite/ndb/include/have_clusterj.inc	2012-10-17 11:50:45 +0000
@@ -16,26 +16,27 @@ use My::Find;
 my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR";
 my $mysql_test_dir = $ENV{MYSQL_TEST_DIR} or die "Need MYSQL_TEST_DIR";
 my $basedir = dirname($mysql_test_dir);
+my $bindir = $ENV{MTR_BINDIR} || $basedir; # Out of source set MTR_BINDIR
 
 #
 # Check if the needed jars and libs are available
 #
 
-my $clusterj_jar = my_find_file($basedir,
+my $clusterj_jar = my_find_file($bindir,
                                 [ "storage/ndb/clusterj", 
                                   "share/java",
                                   "share/mysql/java",
                                   "lib/java" ],
                                 "clusterj-*.jar", NOT_REQUIRED);
 
-my $clusterj_test_jar = my_find_file($basedir,
+my $clusterj_test_jar = my_find_file($bindir,
                                      [ "storage/ndb/clusterj/clusterj-test",
                                        "share/java",
                                        "share/mysql/java",
                                        "lib/java" ],
                                      "clusterj-test-*.jar", NOT_REQUIRED);
 
-my $ndbclient_lib = my_find_file($basedir,
+my $ndbclient_lib = my_find_file($bindir,
                                 ["storage/ndb/src/.libs", 
                                  "storage/ndb/src", 
                                  "lib/mysql",

=== modified file 'mysql-test/suite/ndb/include/have_clusterj_jpa.inc'
--- a/mysql-test/suite/ndb/include/have_clusterj_jpa.inc	2010-03-25 10:06:13 +0000
+++ b/mysql-test/suite/ndb/include/have_clusterj_jpa.inc	2012-10-17 11:50:45 +0000
@@ -16,17 +16,18 @@ use My::Find;
 my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR";
 my $mysql_test_dir = $ENV{MYSQL_TEST_DIR} or die "Need MYSQL_TEST_DIR";
 my $basedir = dirname($mysql_test_dir);
+my $bindir = $ENV{MTR_BINDIR} || $basedir; # Out of source set MTR_BINDIR
 
 #
 # Check if the needed jars are available
 #
-my $clusterj_jpa_jar = my_find_file($basedir,
+my $clusterj_jpa_jar = my_find_file($bindir,
                                 ["storage/ndb/clusterj/clusterj-openjpa", 
                                  "share/mysql/java",             # install unix
                                  "lib/java"],                    # install windows
                                 "clusterjpa-*.jar", NOT_REQUIRED);
 
-my $clusterj_jpa_test_jar = my_find_file($basedir,
+my $clusterj_jpa_test_jar = my_find_file($bindir,
                                     ["storage/ndb/clusterj/clusterj-jpatest", 
                                      "share/mysql/java",             # install unix
                                      "lib/java"],                    # install windows

=== modified file 'mysql-test/suite/ndb/include/have_ndb_rqg.inc'
--- a/mysql-test/suite/ndb/include/have_ndb_rqg.inc	2011-10-14 13:24:01 +0000
+++ b/mysql-test/suite/ndb/include/have_ndb_rqg.inc	2012-10-17 11:50:45 +0000
@@ -18,6 +18,7 @@ use My::Find;
 my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR";
 my $mysql_test_dir = $ENV{MYSQL_TEST_DIR} or die "Need MYSQL_TEST_DIR";
 my $basedir = dirname($mysql_test_dir);
+my $bindir = $ENV{MTR_BINDIR} || $basedir; # Out of source set MTR_BINDIR
 
 #
 # Check if the needed jars and libs are available
@@ -35,7 +36,7 @@ my $runrqg = my_find_file($basedir,
                           ["storage/ndb/test/rqg" ],
                           "run_rqg.sh", NOT_REQUIRED);
 
-my $exe_mysqltest = my_find_bin($basedir,
+my $exe_mysqltest = my_find_bin($bindir,
 		                ["client", "bin"],
                                 "mysqltest", NOT_REQUIRED);
 

=== modified file 'mysql-test/suite/ndb/include/have_ndbjtie_junit.inc'
--- a/mysql-test/suite/ndb/include/have_ndbjtie_junit.inc	2010-02-25 13:37:50 +0000
+++ b/mysql-test/suite/ndb/include/have_ndbjtie_junit.inc	2012-10-17 11:50:45 +0000
@@ -16,15 +16,16 @@ use My::Find;
 my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR";
 my $mysql_test_dir = $ENV{MYSQL_TEST_DIR} or die "Need MYSQL_TEST_DIR";
 my $basedir = dirname($mysql_test_dir);
+my $bindir = $ENV{MTR_BINDIR} || $basedir; # Out of source set MTR_BINDIR
 
 #
 # Check if the needed tests are available
 #
-my $jtie_junit = my_find_file($basedir,
+my $jtie_junit = my_find_file($bindir,
                             ["storage/ndb/src/ndbjtie/test", "share/mysql/java"],
                             "ndbjtie-test-*.jar", NOT_REQUIRED);
 
-my $jtie_unload_junit = my_find_file($basedir,
+my $jtie_unload_junit = my_find_file($bindir,
                             ["storage/ndb/src/ndbjtie/jtie/test/unload", "share/mysql/java"],
                             "jtie-test-unload-*.jar", NOT_REQUIRED);
 

=== modified file 'mysql-test/suite/ndb/include/ndb_info.inc'
--- a/mysql-test/suite/ndb/include/ndb_info.inc	2010-08-02 11:49:11 +0000
+++ b/mysql-test/suite/ndb/include/ndb_info.inc	2012-10-17 11:50:45 +0000
@@ -24,12 +24,13 @@ use My::Find;
 my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR";
 my $mysql_test_dir = $ENV{MYSQL_TEST_DIR} or die "Need MYSQL_TEST_DIR";
 my $basedir = dirname($mysql_test_dir);
+my $bindir = $ENV{MTR_BINDIR} || $basedir; # Out of source set MTR_BINDIR
 my $ndb_connectstring = $ENV{NDB_CONNECTSTRING} or die "Need NDB_CONNECTSTRING";
 
 #
-# Check if the needed jars are available
+# Find ndb_config
 #
-my $ndb_config = my_find_file($basedir,
+my $ndb_config = my_find_file($bindir,
                               ["storage/ndb/tools", "bin"],
                               ["ndb_config", "ndb_config.exe"], NOT_REQUIRED);
 

=== modified file 'mysql-test/suite/ndb/t/have_ndb_dist_priv.inc'
--- a/mysql-test/suite/ndb/t/have_ndb_dist_priv.inc	2011-10-24 10:06:44 +0000
+++ b/mysql-test/suite/ndb/t/have_ndb_dist_priv.inc	2012-10-17 11:50:45 +0000
@@ -16,9 +16,10 @@ use My::Find;
 my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR";
 my $mysql_test_dir = $ENV{MYSQL_TEST_DIR} or die "Need MYSQL_TEST_DIR";
 my $basedir = dirname($mysql_test_dir);
+my $bindir = $ENV{MTR_BINDIR} || $basedir; # Out of source set MTR_BINDIR
 
 #
-# Check if the needed tests are available
+# Check if the necessary files are available
 #
 my $sql_file = my_find_file($basedir,
                             ["storage/ndb/tools", "share/mysql/", "share" ],

=== modified file 'mysql-test/suite/ndb/t/have_ndbinfo.inc'
--- a/mysql-test/suite/ndb/t/have_ndbinfo.inc	2010-03-18 10:22:52 +0000
+++ b/mysql-test/suite/ndb/t/have_ndbinfo.inc	2012-10-17 11:50:45 +0000
@@ -16,11 +16,12 @@ use My::Find;
 my $vardir = $ENV{MYSQLTEST_VARDIR} or die "Need MYSQLTEST_VARDIR";
 my $mysql_test_dir = $ENV{MYSQL_TEST_DIR} or die "Need MYSQL_TEST_DIR";
 my $basedir = dirname($mysql_test_dir);
+my $bindir = $ENV{MTR_BINDIR} || $basedir; # Out of source set MTR_BINDIR
 
 #
 # Check if the needed tests are available
 #
-my $sql_file = my_find_file($basedir,
+my $sql_file = my_find_file($bindir,
                             ["storage/ndb/tools", "share/mysql/"],
                             "ndbinfo.sql", NOT_REQUIRED);
 

=== modified file 'mysql-test/suite/ndb/t/ndb_backup_rate.test'
--- a/mysql-test/suite/ndb/t/ndb_backup_rate.test	2012-09-13 20:18:47 +0000
+++ b/mysql-test/suite/ndb/t/ndb_backup_rate.test	2012-10-16 11:07:51 +0000
@@ -1,5 +1,9 @@
 -- source include/have_ndb.inc
 
+# Valgrinding slows the mysqld down and thus making it
+# impossible to fill the redo log of ndbd(s) -> skip test
+--source include/not_valgrind.inc
+
 use test;
 create table t1 (a varchar(1024)) engine=ndb max_rows=100000000;
 insert into t1 values (repeat('I', 1024));

=== modified file 'storage/ndb/clusterj/clusterj-jdbc/src/test/java/jdbctest/JDBCQueryTest.java'
--- a/storage/ndb/clusterj/clusterj-jdbc/src/test/java/jdbctest/JDBCQueryTest.java	2011-07-05 12:46:07 +0000
+++ b/storage/ndb/clusterj/clusterj-jdbc/src/test/java/jdbctest/JDBCQueryTest.java	2012-10-17 11:56:01 +0000
@@ -5,6 +5,7 @@ import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 
 import com.mysql.clusterj.Session;
@@ -96,6 +97,8 @@ public abstract class JDBCQueryTest exte
         PreparedStatement statement = prepareStatement(connection, sql);
         int[] actual = executeQuery(statement, low, high);
         commit(connection);
+        Arrays.sort(actual);
+        Arrays.sort(expected);
         errorIfNotEqual("betweenQuery: Mismatch on betweenQuery", expected, actual);
     }
 

=== modified file 'storage/ndb/clusterj/clusterj-tie/src/main/java/com/mysql/clusterj/tie/Utility.java'
--- a/storage/ndb/clusterj/clusterj-tie/src/main/java/com/mysql/clusterj/tie/Utility.java	2012-04-05 06:37:40 +0000
+++ b/storage/ndb/clusterj/clusterj-tie/src/main/java/com/mysql/clusterj/tie/Utility.java	2012-10-16 19:21:14 +0000
@@ -116,12 +116,15 @@ public class Utility {
 
     // TODO: this is intended to investigate a class loader issue with Sparc java
     // The idea is to force loading the CharsetMap native class prior to calling the static create method
+    // First, make sure that the native library is loaded because CharsetMap depends on it
+    static {
+        ClusterConnectionServiceImpl.loadSystemLibrary("ndbclient");
+    }
     static Class<?> charsetMapClass = loadClass("com.mysql.ndbjtie.mysql.CharsetMap");
     static Class<?> loadClass(String className) {
         try {
             return Class.forName(className);
         } catch (ClassNotFoundException e) {
-            // TODO Auto-generated catch block
             throw new ClusterJUserException(local.message("ERR_Loading_Native_Class", className), e);
         }
     }

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster-7.2 branch (magnus.blaudd:4033 to 4036) magnus.blaudd17 Oct