Debian Codegraph @

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

raw
1 # ==== Purpose ====
2 #
3 # This test checks the connection drop doesn't happen while replicating every
4 # event when using semi-sync plugin with replica_compressed_protocol.
5 #
6 # ==== Requirements ====
7 #
8 # R1: While running with semi-sync and compressed protocol there should not be
9 # any error related to connection drop in source's error log.
10 #
11 # ==== Implementation ====
12 #
13 # 1. Setup semi-sync replication on source and replica.
14 # 2. Execute insert transactions.
15 # 3. Assert that we don't hit any error.
16 # 4. Cleanup.
17 #
18 # ==== References ====
19 #
20 # Bug#32759421: SEMI SYNC CONNECTION IS OFTEN DROPPED WHEN USING COMPRESSED PROTOCOL
21
22 --source include/not_group_replication_plugin.inc
23 --source include/have_semisync_plugin.inc
24 --source include/have_binlog_format_statement.inc
25 --source include/have_debug.inc
26
27 --source include/save_error_log_position.inc
28 --source include/master-slave.inc
29
30 --echo ==== 1. Setup semi-sync replication on source and replica ====
31
32 --replace_result $SEMISYNC_SOURCE_PLUGIN SEMISYNC_SOURCE_PLUGIN
33 --eval INSTALL PLUGIN rpl_semi_sync_source SONAME '$SEMISYNC_SOURCE_PLUGIN'
34 SET GLOBAL rpl_semi_sync_source_enabled = 1;
35 SET GLOBAL rpl_semi_sync_source_timeout = 10000;
36
37 --source include/rpl_connection_slave.inc
38 --source include/stop_slave.inc
39 --replace_result $SEMISYNC_REPLICA_PLUGIN SEMISYNC_REPLICA_PLUGIN
40 eval INSTALL PLUGIN rpl_semi_sync_replica SONAME '$SEMISYNC_REPLICA_PLUGIN';
41 SET GLOBAL rpl_semi_sync_replica_enabled = 1;
42
43 --source include/start_slave.inc
44 --source include/rpl_connection_master.inc
45 CREATE DATABASE db1;
46 USE db1;
47 CREATE TABLE t1(id int, number int);
48 CREATE TABLE t2 like t1;
49
50 --echo ==== 2. Execute insert transactions ====
51
52 INSERT INTO t1 values (1, 2);
53 INSERT INTO t2 values (2, 1);
54
55 --echo ==== 3. Assert that we don't hit any error ====
56
57 --let $error_pattern = NONE
58 --source include/assert_error_log.inc
59
60 --echo ==== 4. Cleanup ====
61
62 DROP TABLE t1;
63 DROP TABLE t2;
64 DROP DATABASE db1;
65
66 CALL mtr.add_suppression("Got an error reading communication packets*");
67 --source include/sync_slave_sql_with_master.inc
68
69 --source include/stop_slave.inc
70 SET GLOBAL rpl_semi_sync_replica_enabled = OFF;
71 --source include/start_slave.inc
72 UNINSTALL PLUGIN rpl_semi_sync_replica;
73
74 --source include/rpl_connection_master.inc
75 SET GLOBAL rpl_semi_sync_source_enabled = OFF;
76 UNINSTALL PLUGIN rpl_semi_sync_source;
77
78 --source include/rpl_connection_slave.inc
79
80 --source include/rpl_end.inc