Debian Codegraph @

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

raw
1 include/master-slave.inc
2 [connection master]
3 connection master;
4 create table t1(a int);
5 insert into t1 values(1);
6 optimize table t1;
7 Table Op Msg_type Msg_text
8 test.t1 optimize status OK
9 connection slave;
10 connection master;
11 # MYSQL_BINLOG primary_local_binlog > primary_outfile
12 include/assert_grep.inc [Ensure only 3 GTID events exist (Primary)]
13 include/assert_grep.inc [Ensure each GTID event has the thread id (Primary)]
14 #
15 # GTID event's thread_id should use pseudo_thread_id
16 connection master;
17 set @@pseudo_thread_id=99999;
18 insert into t1 values(2);
19 # MYSQL_BINLOG primary_local_binlog > primary_outfile
20 include/assert_grep.inc [GTID event's thread_id should use pseudo_thread_id]
21 #
22 # Test the serial replica
23 connection slave;
24 # MYSQL_BINLOG replica_local_binlog > replica_outfile
25 include/assert_grep.inc [Ensure the same number of GTID events on the replica as the primary]
26 include/assert_grep.inc [Ensure GTID events logged with primary's thread id maintain that value]
27 include/assert_grep.inc [Ensure GTID event logged with pseudo_thread_id on primary maintains that value]
28 #
29 # Test the parallel replica
30 connection slave;
31 include/stop_slave.inc
32 SET @@GLOBAL.slave_parallel_threads=1;
33 include/start_slave.inc
34 connection master;
35 insert into t1 values(3);
36 insert into t1 values(4);
37 connection slave;
38 connection slave;
39 # MYSQL_BINLOG replica_local_binlog > replica_outfile
40 include/assert_grep.inc [Ensure the same number of GTID events on the replica as the primary]
41 include/assert_grep.inc [Ensure GTID the new events are logged on the replica with the thread_id of the master primary thread id]
42 include/stop_slave.inc
43 SET @@GLOBAL.slave_parallel_threads=0;
44 include/start_slave.inc
45 #
46 # MDEV-33924: If pseudo_thread_id is set to 0, thread_id should still be
47 # written and propagated to slaves
48 connection master;
49 set @@pseudo_thread_id=0;
50 insert into t1 values(33924);
51 # MYSQL_BINLOG primary_local_binlog > primary_outfile
52 include/assert_grep.inc [GTID event's thread_id should write pseudo_thread_id value of 0]
53 connection slave;
54 connection slave;
55 # MYSQL_BINLOG replica_local_binlog > replica_outfile
56 include/assert_grep.inc [A 0 value for GTID event's thread_id should be propagated on replicas]
57 # If pseudo_thread_id is set to a value greater than 4 bytes, thread_id
58 # should be truncated to a 32-bit value in the binary log (see
59 # MDEV-15089 for details)
60 connection master;
61 set @@pseudo_thread_id=99999999999999999999;
62 insert into t1 values(15089);
63 # MYSQL_BINLOG primary_local_binlog > primary_outfile
64 include/assert_grep.inc [GTID event's thread_id should truncate values higher than 32 bit]
65 connection slave;
66 connection slave;
67 # MYSQL_BINLOG replica_local_binlog > replica_outfile
68 include/assert_grep.inc [The truncated thread_id should be preserved on the replica]
69 #
70 # Cleanup
71 connection master;
72 drop table t1;
73 include/rpl_end.inc