List:Commits« Previous MessageNext Message »
From:Horst Hunger Date:January 7 2009 8:14am
Subject:bzr commit into mysql-5.0 branch (horst:2635)
View as plain text  
#At file:///work/bzr/mysql-5.0-serverqa/

 2635 Horst Hunger	2009-01-07
      test of patch for 38831
modified:
  mysql-test/include/ndb_backup.inc
  mysql-test/mysql-test-run.pl
  mysql-test/r/mysqltest.result
  mysql-test/r/trigger-compat.result
  mysql-test/t/mysqlbinlog.test
  mysql-test/t/mysqltest.test
  mysql-test/t/rpl_trigger.test
  mysql-test/t/trigger-compat.test

=== modified file 'mysql-test/include/ndb_backup.inc'
--- a/mysql-test/include/ndb_backup.inc	2007-03-07 06:19:37 +0000
+++ b/mysql-test/include/ndb_backup.inc	2009-01-07 08:13:56 +0000
@@ -2,6 +2,13 @@
 # By JBM 2006-02-16 So that the code is not repeated #
 # in test cases and can be reused.                   #
 ######################################################
+
+# Bug#41307: Tests using include/ndb_backup.inc won't work on Windows due to
+#            'grep' call
+# This test is disabled on Windows via the next line until the above bug is
+# resolved
+--source include/not_windows.inc
+
 --exec $NDB_MGM --no-defaults --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -e "start backup" >> $NDB_TOOLS_OUTPUT
 
 # there is no neat way to find the backupid, this is a hack to find it...

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2008-05-13 13:46:38 +0000
+++ b/mysql-test/mysql-test-run.pl	2009-01-07 08:13:56 +0000
@@ -2360,13 +2360,7 @@ sub setup_vardir() {
   {
     # on windows, copy all files from std_data into var/std_data_ln
     mkpath("$opt_vardir/std_data_ln");
-    opendir(DIR, "$glob_mysql_test_dir/std_data")
-      or mtr_error("Can't find the std_data directory: $!");
-    for(readdir(DIR)) {
-      next if -d "$glob_mysql_test_dir/std_data/$_";
-      copy("$glob_mysql_test_dir/std_data/$_", "$opt_vardir/std_data_ln/$_");
-    }
-    closedir(DIR);
+    mtr_copy_dir("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data_ln");
   }
 
   # Remove old log files

=== modified file 'mysql-test/r/mysqltest.result'
--- a/mysql-test/r/mysqltest.result	2007-10-31 17:44:31 +0000
+++ b/mysql-test/r/mysqltest.result	2009-01-07 08:13:56 +0000
@@ -210,7 +210,6 @@ source database
 "MySQL: The world's most popular ;open source database"
 echo message echo message
 
-mysqltest: At line 1: command "false" failed
 mysqltest: At line 1: Missing argument in exec
 MySQL
 "MySQL"
@@ -378,7 +377,6 @@ mysqltest: At line 1: The argument to de
 mysqltest: At line 1: End of line junk detected: "1000"
 mysqltest: At line 1: Missing arguments to system, nothing to do!
 mysqltest: At line 1: Missing arguments to system, nothing to do!
-mysqltest: At line 1: system command 'false' failed
 system command 'NonExistsinfComamdn 2> /dev/null' failed
 test
 test2

=== modified file 'mysql-test/r/trigger-compat.result'
--- a/mysql-test/r/trigger-compat.result	2006-01-27 09:49:07 +0000
+++ b/mysql-test/r/trigger-compat.result	2009-01-07 08:13:56 +0000
@@ -13,9 +13,7 @@ GRANT CREATE ON mysqltest_db1.* TO mysql
 ---> connection: wl2818_definer_con
 CREATE TABLE t1(num_value INT);
 CREATE TABLE t2(user_str TEXT);
-CREATE TRIGGER wl2818_trg1 BEFORE INSERT ON t1
-FOR EACH ROW
-INSERT INTO t2 VALUES(CURRENT_USER());
+CREATE TRIGGER wl2818_trg1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES(CURRENT_USER());
 
 ---> patching t1.TRG...
 

=== modified file 'mysql-test/t/mysqlbinlog.test'
--- a/mysql-test/t/mysqlbinlog.test	2008-02-01 16:26:28 +0000
+++ b/mysql-test/t/mysqlbinlog.test	2009-01-07 08:13:56 +0000
@@ -1,7 +1,9 @@
 # We are using .opt file since we need small binlog size
-
 -- source include/have_log_bin.inc
 
+# Currently disabling this test on Windows due to use of grep and sed
+--source include/not_windows.inc
+
 # we need this for getting fixed timestamps inside of this test
 set timestamp=1000000000;
 

=== modified file 'mysql-test/t/mysqltest.test'
--- a/mysql-test/t/mysqltest.test	2007-11-01 14:42:19 +0000
+++ b/mysql-test/t/mysqltest.test	2009-01-07 08:13:56 +0000
@@ -569,9 +569,6 @@ echo ;
 
 # Illegal use of exec
 --error 1
---exec echo "--exec false" | $MYSQL_TEST 2>&1
-
---error 1
 --exec echo "--exec " | $MYSQL_TEST 2>&1
 
 # ----------------------------------------------------------------------------
@@ -951,8 +948,6 @@ system echo "hej" > /dev/null;
 --exec echo "system;" | $MYSQL_TEST 2>&1
 --error 1
 --exec echo "system $NONEXISTSINFVAREABLI;" | $MYSQL_TEST 2>&1
---error 1
---exec echo "system false;" | $MYSQL_TEST 2>&1
 
 --disable_abort_on_error
 system NonExistsinfComamdn 2> /dev/null;
@@ -1429,7 +1424,7 @@ select "this will be executed";
 #
 # Test zero length result file. Should not pass
 #
---exec touch $MYSQLTEST_VARDIR/tmp/zero_length_file.result
+--exec echo '' > $MYSQLTEST_VARDIR/tmp/zero_length_file.result
 --exec echo "echo ok;" > $MYSQLTEST_VARDIR/tmp/query.sql
 --error 1
 --exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql -R $MYSQLTEST_VARDIR/tmp/zero_length_file.result  > /dev/null 2>&1
@@ -1482,7 +1477,8 @@ drop table t1;
 --error 1
 --exec $MYSQL_TEST --record -x $MYSQLTEST_VARDIR/tmp/bug11731.sql -R $MYSQLTEST_VARDIR/tmp/bug11731.out 2>&1
 # The .out file should be non existent
---exec test ! -s $MYSQLTEST_VARDIR/tmp/bug11731.out
+--error 1
+--file_exists $MYSQLTEST_VARDIR/tmp/bug11731.out
 drop table t1;
 
 
@@ -1503,7 +1499,7 @@ drop table t1;
 
 --exec $MYSQL_TEST --record -x $MYSQLTEST_VARDIR/tmp/bug11731.sql -R $MYSQLTEST_VARDIR/tmp/bug11731.out 2>&1
 # The .out file should exist
---exec test -s $MYSQLTEST_VARDIR/tmp/bug11731.out
+--file_exists $MYSQLTEST_VARDIR/tmp/bug11731.out
 drop table t1;
 remove_file $MYSQLTEST_VARDIR/tmp/bug11731.out;
 remove_file $MYSQLTEST_VARDIR/log/bug11731.log;

=== modified file 'mysql-test/t/rpl_trigger.test'
--- a/mysql-test/t/rpl_trigger.test	2007-12-17 16:56:39 +0000
+++ b/mysql-test/t/rpl_trigger.test	2009-01-07 08:13:56 +0000
@@ -293,7 +293,8 @@ STOP SLAVE;
 
 connection master;
 FLUSH LOGS;
-exec cp $MYSQL_TEST_DIR/std_data/bug16266.000001 $MYSQLTEST_VARDIR/log/master-bin.000001;
+--remove_file $MYSQLTEST_VARDIR/log/master-bin.000001
+--copy_file $MYSQL_TEST_DIR/std_data/bug16266.000001 $MYSQLTEST_VARDIR/log/master-bin.000001
 
 # Make the slave to replay the new binlog.
 

=== modified file 'mysql-test/t/trigger-compat.test'
--- a/mysql-test/t/trigger-compat.test	2006-01-27 09:49:07 +0000
+++ b/mysql-test/t/trigger-compat.test	2009-01-07 08:13:56 +0000
@@ -50,9 +50,7 @@ GRANT CREATE ON mysqltest_db1.* TO mysql
 CREATE TABLE t1(num_value INT);
 CREATE TABLE t2(user_str TEXT);
 
-CREATE TRIGGER wl2818_trg1 BEFORE INSERT ON t1
-  FOR EACH ROW
-    INSERT INTO t2 VALUES(CURRENT_USER());
+CREATE TRIGGER wl2818_trg1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES(CURRENT_USER());
 
 #
 # Remove definers from TRG file.
@@ -61,8 +59,24 @@ CREATE TRIGGER wl2818_trg1 BEFORE INSERT
 --echo
 --echo ---> patching t1.TRG...
 
---exec grep -v 'definers=' $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG > $MYSQLTEST_VARDIR/tmp/t1.TRG
---exec mv $MYSQLTEST_VARDIR/tmp/t1.TRG $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG
+# Here we remove definers.  This is somewhat complex than the original test
+# Previously, the test only used grep -v 'definers=' t1.TRG, but grep is not
+# portable and we have to load the file into a table, exclude the definers line,
+# then load the data to an outfile to accomplish the same effect
+
+--disable_query_log
+--connection default
+CREATE TABLE patch (a blob);
+eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG' INTO TABLE patch;
+# remove original t1.TRG file so SELECT INTO OUTFILE won't fail
+--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG
+eval SELECT SUBSTRING_INDEX(a,'definers=',1) INTO OUTFILE
+ '$MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG' 
+FROM patch;
+DROP TABLE patch;
+--connection wl2818_definer_con
+--enable_query_log
+
 
 #
 # Create a new trigger.

Thread
bzr commit into mysql-5.0 branch (horst:2635) Horst Hunger7 Jan