From 7c8983e99e459f86f9626e6e26828f6dfaa1814d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Jan 2010 18:41:05 +0100 Subject: [PATCH] Fix test failures due to previous change of not setting TZ by default. Fix by explicitly setting timezone for a few more tests that need it. (We avoid setting TZ everywhere by default as this breaks some tests on windows). Also add fix of two other windows failures due to non-portable suppressions, thanks to Alex Budovski. mysql-test/mysql-test-run.pl: Don't let --timezone option from one test stray into the next test (mostly to make results more deterministic rather than depend on whatever test happens to run just before). mysql-test/suite/maria/r/maria-recover.result: Fix suppression pattern to also work with Windows \ path separator. mysql-test/suite/maria/t/maria-recover.test: Fix suppression pattern to also work with Windows \ path separator. mysql-test/suite/parts/inc/partition_timestamp.inc: Set timezone explicitly for test that needs it. mysql-test/suite/parts/r/partition_recover_myisam.result: Fix suppression pattern to also work with Windows \ path separator. mysql-test/suite/parts/t/partition_recover_myisam.test: Fix suppression pattern to also work with Windows \ path separator. mysql-test/t/mysqlbinlog_row-master.opt: Set timezone explicitly for test that needs it. mysql-test/t/mysqlbinlog_row_innodb-master.opt: Set timezone explicitly for test that needs it. mysql-test/t/mysqlbinlog_row_myisam-master.opt: Set timezone explicitly for test that needs it. mysql-test/t/mysqlbinlog_row_trans-master.opt: Set timezone explicitly for test that needs it. --- mysql-test/mysql-test-run.pl | 2 ++ mysql-test/suite/maria/r/maria-recover.result | 3 --- mysql-test/suite/maria/t/maria-recover.test | 10 +++++++--- mysql-test/suite/parts/inc/partition_timestamp.inc | 1 + .../suite/parts/r/partition_recover_myisam.result | 2 -- mysql-test/suite/parts/t/partition_recover_myisam.test | 4 +++- mysql-test/t/mysqlbinlog_row-master.opt | 1 + mysql-test/t/mysqlbinlog_row_innodb-master.opt | 1 + mysql-test/t/mysqlbinlog_row_myisam-master.opt | 1 + mysql-test/t/mysqlbinlog_row_trans-master.opt | 1 + 10 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 mysql-test/t/mysqlbinlog_row-master.opt create mode 100644 mysql-test/t/mysqlbinlog_row_innodb-master.opt create mode 100644 mysql-test/t/mysqlbinlog_row_myisam-master.opt create mode 100644 mysql-test/t/mysqlbinlog_row_trans-master.opt diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index bc2061a506c..ecdd57c83e5 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3457,6 +3457,8 @@ sub run_testcase ($$) { my $timezone= timezone($tinfo); if ($timezone ne 'DEFAULT') { $ENV{'TZ'}= $timezone; + } else { + delete($ENV{'TZ'}); } mtr_verbose("Setting timezone: $timezone"); diff --git a/mysql-test/suite/maria/r/maria-recover.result b/mysql-test/suite/maria/r/maria-recover.result index b4f5c21b26b..aee4119304f 100644 --- a/mysql-test/suite/maria/r/maria-recover.result +++ b/mysql-test/suite/maria/r/maria-recover.result @@ -1,6 +1,3 @@ -call mtr.add_suppression("Checking table: '.\/mysqltest\/t_corrupted2'"); -call mtr.add_suppression("Recovering table: '.\/mysqltest\/t_corrupted2'"); -call mtr.add_suppression("Table '.\/mysqltest\/t_corrupted2' is marked as crashed and should be repaired"); select @@global.maria_recover; @@global.maria_recover BACKUP diff --git a/mysql-test/suite/maria/t/maria-recover.test b/mysql-test/suite/maria/t/maria-recover.test index e73cfa67bf0..e9ae0933d4c 100644 --- a/mysql-test/suite/maria/t/maria-recover.test +++ b/mysql-test/suite/maria/t/maria-recover.test @@ -2,9 +2,13 @@ --source include/have_maria.inc -call mtr.add_suppression("Checking table: '.\/mysqltest\/t_corrupted2'"); -call mtr.add_suppression("Recovering table: '.\/mysqltest\/t_corrupted2'"); -call mtr.add_suppression("Table '.\/mysqltest\/t_corrupted2' is marked as crashed and should be repaired"); +--disable_query_log +# Note: \\. matches a single period. We use '.' as directory separator to +# account for Unix and Windows variation. +call mtr.add_suppression("Checking table: '\\..mysqltest.t_corrupted2'"); +call mtr.add_suppression("Recovering table: '\\..mysqltest.t_corrupted2'"); +call mtr.add_suppression("Table '\\..mysqltest.t_corrupted2' is marked as crashed and should be repaired"); +--enable_query_log # Note: we're setting an environment variable (not prefixing it by $), # so that the perl code below can access it. diff --git a/mysql-test/suite/parts/inc/partition_timestamp.inc b/mysql-test/suite/parts/inc/partition_timestamp.inc index 4ec42471de9..13a570c8760 100644 --- a/mysql-test/suite/parts/inc/partition_timestamp.inc +++ b/mysql-test/suite/parts/inc/partition_timestamp.inc @@ -48,6 +48,7 @@ show create table t3; let $count=12; --echo $count inserts; --disable_query_log +SET TIME_ZONE= '+03:00'; begin; while ($count) { diff --git a/mysql-test/suite/parts/r/partition_recover_myisam.result b/mysql-test/suite/parts/r/partition_recover_myisam.result index 49775ee498e..df737ec2853 100644 --- a/mysql-test/suite/parts/r/partition_recover_myisam.result +++ b/mysql-test/suite/parts/r/partition_recover_myisam.result @@ -1,5 +1,3 @@ -call mtr.add_suppression("./test/t1_will_crash"); -call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc"); CREATE TABLE t1_will_crash (a INT, KEY (a)) ENGINE=MyISAM; INSERT INTO t1_will_crash VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11); FLUSH TABLES; diff --git a/mysql-test/suite/parts/t/partition_recover_myisam.test b/mysql-test/suite/parts/t/partition_recover_myisam.test index fe8a51b17cc..c96cd938f8b 100644 --- a/mysql-test/suite/parts/t/partition_recover_myisam.test +++ b/mysql-test/suite/parts/t/partition_recover_myisam.test @@ -1,7 +1,9 @@ # test the auto-recover (--myisam-recover) of partitioned myisam tables -call mtr.add_suppression("./test/t1_will_crash"); +--disable_query_log +call mtr.add_suppression("..test.t1_will_crash"); call mtr.add_suppression("Got an error from unknown thread, ha_myisam.cc"); +--enable_query_log --source include/have_partition.inc --disable_warnings diff --git a/mysql-test/t/mysqlbinlog_row-master.opt b/mysql-test/t/mysqlbinlog_row-master.opt new file mode 100644 index 00000000000..4d69f3359db --- /dev/null +++ b/mysql-test/t/mysqlbinlog_row-master.opt @@ -0,0 +1 @@ +--timezone=GMT-3 diff --git a/mysql-test/t/mysqlbinlog_row_innodb-master.opt b/mysql-test/t/mysqlbinlog_row_innodb-master.opt new file mode 100644 index 00000000000..4d69f3359db --- /dev/null +++ b/mysql-test/t/mysqlbinlog_row_innodb-master.opt @@ -0,0 +1 @@ +--timezone=GMT-3 diff --git a/mysql-test/t/mysqlbinlog_row_myisam-master.opt b/mysql-test/t/mysqlbinlog_row_myisam-master.opt new file mode 100644 index 00000000000..4d69f3359db --- /dev/null +++ b/mysql-test/t/mysqlbinlog_row_myisam-master.opt @@ -0,0 +1 @@ +--timezone=GMT-3 diff --git a/mysql-test/t/mysqlbinlog_row_trans-master.opt b/mysql-test/t/mysqlbinlog_row_trans-master.opt new file mode 100644 index 00000000000..4d69f3359db --- /dev/null +++ b/mysql-test/t/mysqlbinlog_row_trans-master.opt @@ -0,0 +1 @@ +--timezone=GMT-3