List:Commits« Previous MessageNext Message »
From:Magnus Blåudd Date:March 23 2011 1:28pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4263)
View as plain text  
#At file:///data0/magnus/mysql/7.0-dist-priv/ based on revid:magnus.blaudd@strippeddkd

 4263 Magnus Blåudd	2011-03-23
      ndb dist priv test
       - add have_ndb_dist_priv.inc to look for the location of ndb_dist_priv.sql
         file, its location differs depending on type of distribution
       - skip test if file can't be found

    added:
      mysql-test/suite/ndb/t/have_ndb_dist_priv.inc
    modified:
      mysql-test/suite/ndb/t/ndb_distribute_user.test
      mysql-test/suite/rpl_ndb/t/rpl_ndb_distribute_user.test
=== added file 'mysql-test/suite/ndb/t/have_ndb_dist_priv.inc'
--- a/mysql-test/suite/ndb/t/have_ndb_dist_priv.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/t/have_ndb_dist_priv.inc	2011-03-23 13:26:57 +0000
@@ -0,0 +1,39 @@
+--perl
+use strict;
+
+use File::Basename;
+use IO::File;
+use lib "lib/";
+use My::Find;
+
+#
+# Look for ndb_dist_pric.sql, if not found: skip test.
+#
+
+#
+# Set up paths
+#
+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);
+
+#
+# Check if the needed tests are available
+#
+my $sql_file = my_find_file($basedir,
+                            ["storage/ndb/tools", "share/mysql/"],
+                            "ndb_dist_priv.sql", NOT_REQUIRED);
+
+my $F = IO::File->new("$vardir/tmp/have_ndb_dist_priv_result.inc", "w") or die;
+if ($sql_file) {
+  print $F "--let \$NDB_DIST_PRIV_SQL= $sql_file\n";
+}
+else
+{
+  print $F "skip Could not find ndb_dist_priv.sql;\n";
+}
+$F->close();
+
+EOF
+
+--source $MYSQLTEST_VARDIR/tmp/have_ndb_dist_priv_result.inc

=== modified file 'mysql-test/suite/ndb/t/ndb_distribute_user.test'
--- a/mysql-test/suite/ndb/t/ndb_distribute_user.test	2011-03-23 13:05:27 +0000
+++ b/mysql-test/suite/ndb/t/ndb_distribute_user.test	2011-03-23 13:26:57 +0000
@@ -1,7 +1,9 @@
 --source include/not_embedded.inc
 --source include/have_multi_ndb.inc
 
-let $load_sql_file = $MYSQL_TEST_DIR/../scripts/mysql_load_distribute_privilege_procedures.sql;
+--source have_ndb_dist_priv.inc
+
+let $load_sql_file = $NDB_DIST_PRIV_SQL;
 
 connection server1;
 --disable_query_log

=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_distribute_user.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_distribute_user.test	2011-03-23 13:05:27 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_distribute_user.test	2011-03-23 13:26:57 +0000
@@ -3,7 +3,9 @@
 --source include/have_binlog_format_mixed_or_row.inc
 --source suite/rpl_ndb/ndb_master-slave.inc
 
-let $load_sql_file = $MYSQL_TEST_DIR/../scripts/mysql_load_distribute_privilege_procedures.sql;
+--source suite/ndb/t/have_ndb_dist_priv.inc
+
+let $load_sql_file = $NDB_DIST_PRIV_SQL;
 
 connection server1;
 --disable_query_log

Attachment: [text/bzr-bundle] bzr/magnus.blaudd@oracle.com-20110323132657-k4y3wb2ifpqtk568.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (magnus.blaudd:4263) Magnus Blåudd23 Mar