| 1 |
--source include/have_semisync_plugin.inc |
| 2 |
|
| 3 |
--let rpl_topology= 1->2,1->3 |
| 4 |
--source include/rpl_init.inc |
| 5 |
--source include/have_binlog_format_row.inc |
| 6 |
CALL mtr.add_suppression(".*Got an error reading communication packets.*"); |
| 7 |
|
| 8 |
################################################################################ |
| 9 |
# Bug#18466390 INCORRECT BEHAIVIOR WHEN SETTING UP SEMISYNC VARIABLES AS STARTUP |
| 10 |
# OPTIONS |
| 11 |
# |
| 12 |
# Semisync is not initialized correctly if below options are set at starting |
| 13 |
# server option. |
| 14 |
# - rpl_semi_sync_source_wait_no_replica and |
| 15 |
# - rpl_semi_sync_source_wait_slave_count |
| 16 |
# |
| 17 |
# Verify semisync is initialized correctly. |
| 18 |
################################################################################ |
| 19 |
|
| 20 |
--echo # |
| 21 |
--echo # Semisync master's status should be OFF if |
| 22 |
--echo # rpl_semi_sync_source_wait_no_replica is set to 0 at starting server. |
| 23 |
--echo # |
| 24 |
--source include/assert_semisync_source_status_off.inc |
| 25 |
|
| 26 |
CREATE TABLE t1(c1 INT); |
| 27 |
|
| 28 |
--let $assert_status_name= rpl_semi_sync_source_tx_waits |
| 29 |
--let $assert_status_value= 0 |
| 30 |
--source include/assert_status.inc |
| 31 |
|
| 32 |
--echo # |
| 33 |
--echo # Semisync's status should still be OFF, because there is only one slave |
| 34 |
--echo # |
| 35 |
--let $rpl_connection_name= server_2 |
| 36 |
--source include/rpl_connection.inc |
| 37 |
--source include/install_semisync_replica.inc |
| 38 |
|
| 39 |
--let $rpl_connection_name= server_1 |
| 40 |
--source include/rpl_connection.inc |
| 41 |
|
| 42 |
--let $assert_variable_name= rpl_semi_sync_source_wait_for_replica_count |
| 43 |
--let $assert_variable_value= 2 |
| 44 |
--source include/assert_variable.inc |
| 45 |
|
| 46 |
INSERT INTO t1 VALUES(1); |
| 47 |
--source include/assert_semisync_source_status_off.inc |
| 48 |
|
| 49 |
--echo # |
| 50 |
--echo # Verify 'SET GLOBAL rpl_semi_sync_source_enabled= ON' sets semisync |
| 51 |
--echo # master's status correctly when there are enough semisync slaves. |
| 52 |
--echo # |
| 53 |
--let $rpl_connection_name= server_3 |
| 54 |
--source include/rpl_connection.inc |
| 55 |
--source include/install_semisync_replica.inc |
| 56 |
|
| 57 |
--let $rpl_connection_name= server_1 |
| 58 |
--source include/rpl_connection.inc |
| 59 |
|
| 60 |
SET GLOBAL rpl_semi_sync_source_enabled= OFF; |
| 61 |
--source include/assert_semisync_source_status_off.inc |
| 62 |
|
| 63 |
SET GLOBAL rpl_semi_sync_source_enabled= ON; |
| 64 |
--source include/assert_semisync_source_status_on.inc |
| 65 |
DROP TABLE t1; |
| 66 |
|
| 67 |
################################################################################ |
| 68 |
# Bug#18266989 ACK_RECEIVER THREAD DOESN'T START WHEN STARTING SEMISYNC THROUGH |
| 69 |
# SERVER OPTIONS |
| 70 |
# |
| 71 |
# Ack_receiver thread on the master didn't start successfully when setting up |
| 72 |
# semisync replication through server options. |
| 73 |
################################################################################ |
| 74 |
--echo # |
| 75 |
--echo # Verify ack_receiver thread is created |
| 76 |
--echo # |
| 77 |
|
| 78 |
--let $assert_text= ack receiver thread is created; |
| 79 |
--let $assert_cond= count(*) = 1 FROM performance_schema.threads WHERE name LIKE "%Ack_receiver" |
| 80 |
--source include/assert.inc |
| 81 |
|
| 82 |
CREATE TABLE t1(c1 INT); |
| 83 |
--source include/rpl_sync.inc |
| 84 |
|
| 85 |
--echo # |
| 86 |
--echo # Verify semisync replication works well |
| 87 |
--echo # |
| 88 |
|
| 89 |
--let $rpl_connection_name= server_1 |
| 90 |
--source include/rpl_connection.inc |
| 91 |
--source include/assert_semisync_source_status_on.inc |
| 92 |
|
| 93 |
DROP TABLE t1; |
| 94 |
--source include/rpl_sync.inc |
| 95 |
|
| 96 |
--let $rpl_connection_name= server_2 |
| 97 |
--source include/rpl_connection.inc |
| 98 |
--source include/uninstall_semisync_replica.inc |
| 99 |
|
| 100 |
--let $rpl_connection_name= server_3 |
| 101 |
--source include/rpl_connection.inc |
| 102 |
--source include/uninstall_semisync_replica.inc |
| 103 |
|
| 104 |
--source include/rpl_end.inc |