Debian Codegraph @

mysql-test/suite/rpl/t/rpl_temporal_format_default_to_default.test

raw
1 #
2 # This include file is used by more than one test suite
3 # (currently rpl and binlog_encryption).
4 # Please check all dependent tests after modifying it
5 #
6
7 --source include/master-slave.inc
8
9 if ($force_master_mysql56_temporal_format)
10 {
11 connection master;
12 eval SET @@global.mysql56_temporal_format=$force_master_mysql56_temporal_format;
13 }
14
15 if ($force_slave_mysql56_temporal_format)
16 {
17 connection slave;
18 eval SET @@global.mysql56_temporal_format=$force_slave_mysql56_temporal_format;
19 }
20
21 connection master;
22 SELECT @@global.mysql56_temporal_format AS on_master;
23 connection slave;
24 SELECT @@global.mysql56_temporal_format AS on_slave;
25 connection master;
26
27 CREATE TABLE t1
28 (
29 c0 TIME(0),
30 c1 TIME(1),
31 c2 TIME(2),
32 c3 TIME(3),
33 c4 TIME(4),
34 c5 TIME(5),
35 c6 TIME(6)
36 );
37 CREATE TABLE t2
38 (
39 c0 TIMESTAMP(0),
40 c1 TIMESTAMP(1),
41 c2 TIMESTAMP(2),
42 c3 TIMESTAMP(3),
43 c4 TIMESTAMP(4),
44 c5 TIMESTAMP(5),
45 c6 TIMESTAMP(6)
46 );
47
48 CREATE TABLE t3
49 (
50 c0 DATETIME(0),
51 c1 DATETIME(1),
52 c2 DATETIME(2),
53 c3 DATETIME(3),
54 c4 DATETIME(4),
55 c5 DATETIME(5),
56 c6 DATETIME(6)
57 );
58 INSERT INTO t1 VALUES ('01:01:01','01:01:01.1','01:01:01.11','01:01:01.111','01:01:01.1111','01:01:01.11111','01:01:01.111111');
59 INSERT INTO t2 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
60 INSERT INTO t3 VALUES ('2001-01-01 01:01:01','2001-01-01 01:01:01.1','2001-01-01 01:01:01.11','2001-01-01 01:01:01.111','2001-01-01 01:01:01.1111','2001-01-01 01:01:01.11111','2001-01-01 01:01:01.111111');
61 SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
62 WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
63 sync_slave_with_master;
64
65 connection slave;
66 --query_vertical SELECT * FROM t1;
67 --query_vertical SELECT * FROM t2;
68 --query_vertical SELECT * FROM t3;
69 SELECT TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH,DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES
70 WHERE TABLE_NAME RLIKE 't[1-3]' ORDER BY TABLE_NAME;
71
72 connection master;
73 DROP TABLE t1;
74 DROP TABLE t2;
75 DROP TABLE t3;
76
77 connection slave;
78 SET @@global.mysql56_temporal_format=DEFAULT;
79 connection master;
80 SET @@global.mysql56_temporal_format=DEFAULT;
81
82 --source include/rpl_end.inc