blob: df8cc431a74b798899963959f419b4b1582a6568 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
include/master-slave.inc
[connection master]
SET sql_mode=TIME_ROUND_FRACTIONAL;
SET time_zone='+00:00';
SET timestamp=UNIX_TIMESTAMP('2010-12-31 23:59:59.999999');
CREATE TABLE t1 (id SERIAL, a TIMESTAMP(4));
INSERT INTO t1 (a) VALUES (now(6));
INSERT INTO t1 (a) VALUES ('2011-01-01 23:59:59.999999');
CREATE TABLE t2 (id SERIAL, a DATETIME(4));
INSERT INTO t2 (a) VALUES (now(6));
INSERT INTO t2 (a) VALUES ('2011-01-01 23:59:59.999999');
CREATE TABLE t3 (id SERIAL, a TIME(4));
INSERT INTO t3 (a) VALUES (now(6));
Warnings:
Note 1265 Data truncated for column 'a' at row 1
INSERT INTO t3 (a) VALUES ('2011-01-01 23:59:59.999999');
Warnings:
Note 1265 Data truncated for column 'a' at row 1
SELECT * FROM t1;
id a
1 2011-01-01 00:00:00.0000
2 2011-01-02 00:00:00.0000
SELECT * FROM t2;
id a
1 2011-01-01 00:00:00.0000
2 2011-01-02 00:00:00.0000
SELECT * FROM t3;
id a
1 24:00:00.0000
2 24:00:00.0000
connection slave;
connection slave;
SET time_zone='+00:00';
SELECT * FROM t1;
id a
1 2011-01-01 00:00:00.0000
2 2011-01-02 00:00:00.0000
SELECT * FROM t2;
id a
1 2011-01-01 00:00:00.0000
2 2011-01-02 00:00:00.0000
SELECT * FROM t3;
id a
1 24:00:00.0000
2 24:00:00.0000
connection master;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
include/rpl_end.inc
|