Debian Codegraph @

mysql-test/suite/rpl_gtid/t/rpl_multi_source_timestamps.test

raw
1 #
2 # ==== Purpose ====
3 #
4 # This test checks if the immediate_commit_timestamp (ICT) and the
5 # original_commit_timestamp (OCT) are generated and replicated correctly in a
6 # server_1 (Master) -> server_2,server_3-> server_2 topology, all of them mysql-5.8+
7 #
8 # ==== Implementation ====
9 #
10 # Considering the Multi Source replication, we make the following
11 # assertions:
12 # 1) original_commit_timestamp is same across topology for a transaction.
13 # 2) On the original server, original_commit_timestamp = immediate_commit_timestamp.
14 # 2) the immediate_commit_timestamp increases as we go down in the topology.
15 #
16 #
17 # ==== References ====
18 #
19 # WL#7319 Infrastructure for correct replication lag monitoring
20
21
22 # Legend:
23 # OCT: original_commit_timestamp
24 # ICT: immediate_commit_timestamp
25
26 --source include/have_binlog_format_row.inc
27 # Test requires master-info-repository=TABLE, relay-log-info-repository=TABLE
28 --source include/have_slave_repository_type_table.inc
29
30 # Establish the msr topology.
31 --let $rpl_topology=1->2,3->2
32 --let $rpl_multi_source= 1
33
34 --source include/rpl_init.inc
35
36 --let $rpl_connection_name= server_1
37 --source include/rpl_connection.inc
38 --let $server_1_uuid= query_get_value(select @@global.server_uuid, @@global.server_uuid, 1)
39
40 CREATE DATABASE db1;
41 CREATE TABLE db1.t1(a int);
42 INSERT INTO db1.t1 VALUES(1);
43 UPDATE db1.t1 SET a=2;
44 DELETE FROM db1.t1 WHERE a=1;
45 DROP TABLE db1.t1;
46 DROP DATABASE db1;
47
48 --let $rpl_channel_name= 'channel_1'
49 --let $sync_slave_connection=server_2
50 --source include/sync_slave_sql_with_master.inc
51
52 --let $rpl_connection_name= server_3
53 --source include/rpl_connection.inc
54 --let $server_3_uuid= query_get_value(select @@global.server_uuid, @@global.server_uuid, 1)
55
56 CREATE DATABASE db2;
57 CREATE TABLE db2.t2(a int);
58 INSERT INTO db2.t2 VALUES(1);
59 UPDATE db2.t2 SET a=2;
60 DELETE FROM db2.t2 WHERE a=1;
61 DROP TABLE db2.t2;
62 DROP DATABASE db2;
63
64 --let $rpl_channel_name= 'channel_3'
65 --let $sync_slave_connection=server_2
66 --source include/sync_slave_sql_with_master.inc
67
68 --let $check_master_OCT= 1
69 --let $check_master_slave_ICT= 1
70 --let $i=1
71 while($i<8)
72 {
73 --let $gtid= $server_1_uuid:$i
74 --let $master= server_1
75 --let $slave=server_2
76 --source extra/rpl_tests/rpl_replication_timestamps.inc
77
78 --let $gtid= $server_3_uuid:$i
79 --let $master=server_3
80 --let $slave=server_2
81 --source extra/rpl_tests/rpl_replication_timestamps.inc
82 --inc $i
83 }
84
85 --let $rpl_skip_sync= 1
86 --source include/rpl_end.inc