Debian Codegraph @

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

raw
1 ################################################################################
2 # Bug#26027024 SLAVE_COMPRESSED_PROTOCOL DOESN'T WORK WITH SEMI-SYNC
3 # REPLICATION IN MYSQL-5.7
4 #
5 # Steps to reproduce:
6 # 1) Set slave_compressed_protocol ON on Slave.
7 # 2) Do some sample work on Master
8 # 3) After the work is synced on Slave, check that there is no error
9 # (Read semi-sync reply magic number error) on Slave.
10 # 4) Cleanup
11 ################################################################################
12 # Test is independent of Binlog format. One of the three formats is enough
13 # for testing. Choosing 'Row' format.
14 --source include/have_binlog_format_row.inc
15 --source include/master-slave.inc
16
17 --let $sav_enabled_master=`SELECT @@GLOBAL.rpl_semi_sync_master_enabled `
18 SET @@GLOBAL.rpl_semi_sync_master_enabled = 1;
19
20 --connection slave
21 source include/stop_slave.inc;
22 --let $sav_enabled_slave=`SELECT @@GLOBAL.rpl_semi_sync_slave_enabled `
23 SET @@GLOBAL.rpl_semi_sync_slave_enabled = 1;
24 source include/start_slave.inc;
25
26 --connection master
27 # Do some sample work on Master with slave_compressed_protocol ON.
28 # (slave_compressed_protocol is set to ON in -slave.opt file of this test.)
29 CREATE TABLE t1 (i INT);
30 DROP TABLE t1;
31
32 # Make sure sync is done, so that next 'assert' step can be executed without
33 # any issues.
34 --source include/rpl_sync.inc
35
36 # Without the fix, the test would have generated few
37 # errors in the error log. With the fix, test will
38 # pass without any errors in the error log.
39 --let $assert_text= Check that there is no 'Read semi-sync reply magic number error' in error log.
40 --let $assert_select=Read semi-sync reply magic number error
41 --let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
42 --let $assert_count= 0
43 --let $assert_only_after = CURRENT_TEST: rpl.rpl_semi_sync_slave_compressed_protocol
44 --source include/assert_grep.inc
45
46 --connection master
47 --evalp SET @@GLOBAL. rpl_semi_sync_master_enabled = $sav_enabled_master
48
49 --connection slave
50 source include/stop_slave.inc;
51 --evalp SET @@GLOBAL. rpl_semi_sync_slave_enabled = $sav_enabled_slave
52 source include/start_slave.inc;
53
54 # Cleanup
55 --source include/rpl_end.inc