mariadb/mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result
unknown 80ac8858d5 Fix Windows test failures in binlog tests in certain time zones.
On Unix systems TZ can be set to change the time zone for specific processes only.
But on Windows this does not fully work. It changes some aspects of time zones
in the system but not others (notably localtime() vs. file system time stamps).

This causes test failures in Windows in certain time zones (but not all),
where PURGE BEFORE DATE statements get the wrong files when TZ is set to
+03:00 by default.

Fix by only setting TZ in the small number of tests that really need it, and leave
it untouched in the rest.

Thanks to Alex Budovski for helping with this.

mysql-test/include/ps_conv.inc:
  Explicitly set TIME_ZONE, as mysql-test-run.pl now does not set it.
mysql-test/mysql-test-run.pl:
  Do not set TZ by default, as it causes problems on Windows.
mysql-test/suite/binlog/r/binlog_unsafe.result:
  Explicitly set TIME_ZONE, as mysql-test-run.pl now does not set it.
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Explicitly set TIME_ZONE, as mysql-test-run.pl now does not set it.
mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result:
  Explicitly set TIME_ZONE, as mysql-test-run.pl now does not set it.
mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test:
  Explicitly set TIME_ZONE, as mysql-test-run.pl now does not set it.
mysql-test/t/mysqlbinlog2-master.opt:
  mysql-test-run.pl no longer sets TZ by default, so set it explicitly for this particular test.
2010-01-19 11:36:52 +01:00

47 lines
1.1 KiB
Text

stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1 (n int auto_increment primary key);
set insert_id = 2000;
insert into t1 values (NULL),(NULL),(NULL);
select * from t1;
n
2000
2001
2002
show slave hosts;
Server_id Host Port Rpl_recovery_rank Master_id
2 127.0.0.1 9999 0 1
drop table t1;
stop slave;
create table t2(id int auto_increment primary key, created datetime);
SET TIME_ZONE= '+03:00';
set timestamp=12345;
insert into t2 set created=now();
select * from t2;
id created
1 1970-01-01 06:25:45
create table t3 like t2;
create temporary table t4 like t2;
create table t5 select * from t4;
start slave;
select * from t2;
id created
1 1970-01-01 06:25:45
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
show create table t5;
Table Create Table
t5 CREATE TABLE `t5` (
`id` int(11) NOT NULL DEFAULT '0',
`created` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2,t3,t5;