Debian Codegraph @

mysql-test/suite/rpl/r/rpl_time_zone.result

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection master]
6 set @my_time_zone= @@global.time_zone;
7 set timestamp=100000000;
8 create table t1 (t timestamp, n int not null auto_increment, PRIMARY KEY(n));
9 create table t2 (t char(32), n int not null auto_increment, PRIMARY KEY(n));
10 select @@time_zone;
11 @@time_zone
12 Japan
13 select @@time_zone;
14 @@time_zone
15 Europe/Moscow
16 insert into t1 values ('20050101000000', NULL), ('20050611093902',NULL);
17 insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL);
18 SELECT * FROM t1 ORDER BY n;
19 t n
20 2005-01-01 00:00:00 1
21 2005-06-11 09:39:02 2
22 2004-01-01 00:00:00 3
23 2004-06-11 09:39:02 4
24 include/sync_slave_sql_with_master.inc
25 SELECT * FROM t1 ORDER BY n;
26 t n
27 2005-01-01 06:00:00 1
28 2005-06-11 14:39:02 2
29 2004-01-01 06:00:00 3
30 2004-06-11 14:39:02 4
31 delete from t1;
32 set time_zone='Europe/Moscow';
33 insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL);
34 SELECT * FROM t1 ORDER BY n;
35 t n
36 2004-01-01 00:00:00 5
37 2004-06-11 09:39:02 6
38 include/sync_slave_sql_with_master.inc
39 set time_zone='Europe/Moscow';
40 SELECT * FROM t1 ORDER BY n;
41 t n
42 2004-01-01 00:00:00 5
43 2004-06-11 09:39:02 6
44 delete from t1;
45 set time_zone='UTC';
46 load data infile '../../std_data/rpl_timezone2.dat' ignore into table t1;
47 Warnings:
48 Warning 1265 Data truncated for column 't' at row 1
49 Warning 1261 Row 1 doesn't contain data for all columns
50 Warning 1265 Data truncated for column 't' at row 2
51 Warning 1261 Row 2 doesn't contain data for all columns
52 SELECT * FROM t1 ORDER BY n;
53 t n
54 0000-00-00 00:00:00 7
55 0000-00-00 00:00:00 8
56 include/sync_slave_sql_with_master.inc
57 set time_zone='UTC';
58 SELECT * FROM t1 ORDER BY n;
59 t n
60 0000-00-00 00:00:00 7
61 0000-00-00 00:00:00 8
62 set time_zone='Europe/Moscow';
63 set time_zone='Europe/Moscow';
64 delete from t1;
65 insert into t1 values ('20040101000000',NULL), ('20040611093902',NULL);
66 set time_zone='MET';
67 insert into t2 (select * from t1);
68 SELECT * FROM t1 ORDER BY n;
69 t n
70 2003-12-31 22:00:00 10
71 2004-06-11 07:39:02 11
72 include/sync_slave_sql_with_master.inc
73 SELECT * FROM t2 ORDER BY n;
74 t n
75 2003-12-31 22:00:00 10
76 2004-06-11 07:39:02 11
77 delete from t2;
78 set timestamp=1000072000;
79 insert into t2 values (current_timestamp,NULL), (current_date,NULL), (current_time,NULL);
80 include/sync_slave_sql_with_master.inc
81 SELECT * FROM t2 ORDER BY n;
82 t n
83 2001-09-09 23:46:40 12
84 2001-09-09 13
85 23:46:40 14
86 delete from t2;
87 insert into t2 values (from_unixtime(1000000000),NULL),
88 (unix_timestamp('2001-09-09 03:46:40'),NULL);
89 SELECT * FROM t2 ORDER BY n;
90 t n
91 2001-09-09 03:46:40 15
92 1000000000 16
93 include/sync_slave_sql_with_master.inc
94 SELECT * FROM t2 ORDER BY n;
95 t n
96 2001-09-09 03:46:40 15
97 1000000000 16
98 set global time_zone='MET';
99 delete from t2;
100 set time_zone='UTC';
101 insert into t2 values(convert_tz('2004-01-01 00:00:00','MET',@@time_zone),NULL);
102 insert into t2 values(convert_tz('2005-01-01 00:00:00','MET','Japan'),NULL);
103 SELECT * FROM t2 ORDER BY n;
104 t n
105 2003-12-31 23:00:00 17
106 2005-01-01 08:00:00 18
107 include/sync_slave_sql_with_master.inc
108 SELECT * FROM t2 ORDER BY n;
109 t n
110 2003-12-31 23:00:00 17
111 2005-01-01 08:00:00 18
112 drop table t1, t2;
113 include/sync_slave_sql_with_master.inc
114 set global time_zone= @my_time_zone;
115 End of 4.1 tests
116 CREATE TABLE t1 (a INT, b TIMESTAMP);
117 INSERT INTO t1 VALUES (1, NOW());
118 SET @@session.time_zone='Japan';
119 SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
120 UPDATE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1;
121 Warnings:
122 Warning 1264 Out of range value for column 'b' at row 1
123 SET sql_mode = default;
124 SELECT * FROM t1 ORDER BY a;
125 a b
126 1 0000-00-00 00:00:00
127 include/sync_slave_sql_with_master.inc
128 SET @@session.time_zone='Japan';
129 SELECT * FROM t1 ORDER BY a;
130 a b
131 1 0000-00-00 00:00:00
132 SET @@session.time_zone = default;
133 DROP TABLE t1;
134 SET @@session.time_zone = default;
135 include/sync_slave_sql_with_master.inc
136 include/stop_slave.inc
137 include/rpl_end.inc
138 End of 5.0 tests