polardbxengine/mysql-test/suite/group_replication/r/gr_stop_when_unreachable.re...

58 lines
2.1 KiB
Plaintext

#
# 1. Create a group with 3 members
# Extract each server uuid
# Create a table on it.
#
include/group_replication.inc [rpl_server_count=3]
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection server1]
[connection server1]
[connection server2]
[connection server3]
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
include/rpl_sync.inc
#
# 2. Crash server 2 and server 3
# Check they are marked as unreachable
#
[connection server2]
[connection server3]
[connection server1]
include/gr_wait_for_member_state.inc
include/gr_wait_for_member_state.inc
#
# 3. Execute a query that will block
#
INSERT INTO t1 VALUES (2);
#
# 4. Stop Group Replication on server 1
# The pending query should die
#
[connection server_1]
include/stop_group_replication.inc
[connection server1]
ERROR HY000: Error on observer while running replication hook 'before_commit'.
#
# 5. Clean up.
#
[connection server1]
DROP TABLE t1;
set session sql_log_bin=0;
call mtr.add_suppression("The member lost contact with a majority of the members in the group. Until the network is restored.*");
call mtr.add_suppression("Due to a plugin error, some transactions were unable to be certified and will now rollback.");
call mtr.add_suppression("Timeout while waiting for the group communication engine to exit!");
call mtr.add_suppression("The member has failed to gracefully leave the group.");
call mtr.add_suppression("read failed");
call mtr.add_suppression("Error while waiting for conflict detection procedure to finish on session .*");
call mtr.add_suppression("Run function 'before_commit' in plugin 'group_replication' failed");
set session sql_log_bin=1;
[connection server_2]
include/rpl_reconnect.inc
DROP TABLE t1;
[connection server_3]
include/rpl_reconnect.inc
DROP TABLE t1;
include/group_replication_end.inc