Debian Codegraph @

mysql-test/suite/rpl_gtid/r/rpl_gtids_table_disable_log_replica_updates.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 # Adding debug point 'dont_compress_gtid_table' to @@GLOBAL.debug
7 CREATE TABLE IF NOT EXISTS t1 (a INT) ENGINE=InnoDB;
8 CREATE TABLE t2 (a INT) ENGINE=MyISAM;
9 INSERT INTO t1 VALUES(1);
10 INSERT INTO t2 VALUES(1);
11 #
12 # Verify that transactions' gtids can be reported
13 # from global.gtid_executed correctly.
14 #
15 include/assert.inc [committed gtids MASTER_UUID:1-4]
16 #
17 # Store gtids MASTER_UUID:1-4 in gtid_executed table on binlog rotation
18 #
19 FLUSH LOGS;
20 SELECT * FROM mysql.gtid_executed;
21 source_uuid interval_start interval_end
22 MASTER_UUID 1 4
23 include/sync_slave_sql_with_master.inc
24 #
25 # connection slave
26 #
27 include/assert.inc [committed gtids MASTER_UUID:1-4]
28 #
29 # Verify that slave thread stores gtid into gtid_executed table within
30 # each transaction if binlog is on and log_slave_updated is disabled.
31 #
32 SELECT * FROM mysql.gtid_executed;
33 source_uuid interval_start interval_end
34 MASTER_UUID 1 1
35 MASTER_UUID 2 2
36 MASTER_UUID 3 3
37 MASTER_UUID 4 4
38 SET @@GLOBAL.DEBUG= '-d, dont_compress_gtid_table';
39 INSERT INTO t1 VALUES(2);
40 INSERT INTO t2 VALUES(2);
41 #
42 # Verify that store gtids SLAVE_UUID:1-2 into gtid_executed table,
43 # which is also compressed on binlog rotation.
44 #
45 SET @old_compression_period= @@GLOBAL.GTID_EXECUTED_COMPRESSION_PERIOD;
46 SET @@GLOBAL.GTID_EXECUTED_COMPRESSION_PERIOD= 1;
47 FLUSH LOGS;
48 SET @@GLOBAL.GTID_EXECUTED_COMPRESSION_PERIOD= @old_compression_period;
49 SELECT * FROM mysql.gtid_executed where source_uuid="MASTER_UUID";
50 source_uuid interval_start interval_end
51 MASTER_UUID 1 4
52 SELECT * FROM mysql.gtid_executed where source_uuid="SLAVE_UUID";
53 source_uuid interval_start interval_end
54 SLAVE_UUID 1 2
55 #
56 # Verify that we can get the correct set of gtid_purged when purging
57 # logs if binlog is enabled and log_replica_updates is disabled.
58 #
59 PURGE BINARY LOGS TO 'slave-bin.000002';
60 include/assert.inc [purged gtids SLAVE_UUID:1-2,MASTER_UUID:1-4]
61 #
62 # Verify that we can get the correct set from 'gtid_executed' table
63 # when executing a big transaction that exceeds the max size of the
64 # binlog if binlog is enabled and log_replica_updates is disabled.
65 #
66 SET @SIZE_DEFAULT=@@MAX_BINLOG_SIZE;
67 SET GLOBAL MAX_BINLOG_SIZE=4096;
68 SET @@GLOBAL.DEBUG= '+d, dont_compress_gtid_table';
69 SET @@session.binlog_transaction_compression=FALSE;
70 BEGIN;
71 INSERT INTO t1 VALUES (1);;
72 INSERT INTO t1 VALUES (2);;
73 INSERT INTO t1 VALUES (3);;
74 INSERT INTO t1 VALUES (4);;
75 INSERT INTO t1 VALUES (5);;
76 INSERT INTO t1 VALUES (6);;
77 INSERT INTO t1 VALUES (7);;
78 INSERT INTO t1 VALUES (8);;
79 INSERT INTO t1 VALUES (9);;
80 INSERT INTO t1 VALUES (10);;
81 INSERT INTO t1 VALUES (11);;
82 INSERT INTO t1 VALUES (12);;
83 INSERT INTO t1 VALUES (13);;
84 INSERT INTO t1 VALUES (14);;
85 INSERT INTO t1 VALUES (15);;
86 INSERT INTO t1 VALUES (16);;
87 INSERT INTO t1 VALUES (17);;
88 INSERT INTO t1 VALUES (18);;
89 INSERT INTO t1 VALUES (19);;
90 INSERT INTO t1 VALUES (20);;
91 INSERT INTO t1 VALUES (21);;
92 INSERT INTO t1 VALUES (22);;
93 INSERT INTO t1 VALUES (23);;
94 INSERT INTO t1 VALUES (24);;
95 INSERT INTO t1 VALUES (25);;
96 INSERT INTO t1 VALUES (26);;
97 INSERT INTO t1 VALUES (27);;
98 INSERT INTO t1 VALUES (28);;
99 INSERT INTO t1 VALUES (29);;
100 INSERT INTO t1 VALUES (30);;
101 INSERT INTO t1 VALUES (31);;
102 INSERT INTO t1 VALUES (32);;
103 INSERT INTO t1 VALUES (33);;
104 INSERT INTO t1 VALUES (34);;
105 INSERT INTO t1 VALUES (35);;
106 INSERT INTO t1 VALUES (36);;
107 INSERT INTO t1 VALUES (37);;
108 INSERT INTO t1 VALUES (38);;
109 INSERT INTO t1 VALUES (39);;
110 INSERT INTO t1 VALUES (40);;
111 INSERT INTO t1 VALUES (41);;
112 INSERT INTO t1 VALUES (42);;
113 INSERT INTO t1 VALUES (43);;
114 INSERT INTO t1 VALUES (44);;
115 INSERT INTO t1 VALUES (45);;
116 INSERT INTO t1 VALUES (46);;
117 INSERT INTO t1 VALUES (47);;
118 INSERT INTO t1 VALUES (48);;
119 INSERT INTO t1 VALUES (49);;
120 INSERT INTO t1 VALUES (50);;
121 INSERT INTO t1 VALUES (51);;
122 INSERT INTO t1 VALUES (52);;
123 INSERT INTO t1 VALUES (53);;
124 INSERT INTO t1 VALUES (54);;
125 INSERT INTO t1 VALUES (55);;
126 INSERT INTO t1 VALUES (56);;
127 INSERT INTO t1 VALUES (57);;
128 INSERT INTO t1 VALUES (58);;
129 INSERT INTO t1 VALUES (59);;
130 COMMIT;
131 # Removing debug point 'dont_compress_gtid_table' from @@GLOBAL.debug
132 SET GLOBAL MAX_BINLOG_SIZE=@SIZE_DEFAULT;
133 SELECT * FROM mysql.gtid_executed where source_uuid="MASTER_UUID";
134 source_uuid interval_start interval_end
135 MASTER_UUID 1 4
136 SELECT * FROM mysql.gtid_executed where source_uuid="SLAVE_UUID";
137 source_uuid interval_start interval_end
138 SLAVE_UUID 1 2
139 SLAVE_UUID 3 3
140 SET @@session.binlog_transaction_compression= SAVED;
141 DROP TABLE t1,t2;
142 include/rpl_end.inc