Server IP : 172.67.216.182 / Your IP : 172.70.143.27 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/rapid/plugin/group_replication/tests/mtr/r/ |
Upload File : |
[connection server1] [connection server2] [connection server3] [connection server4] [connection server5] [connection server1] ############################################################ # 1. Create a group with 5 members and a table on it. include/group_replication.inc [rpl_server_count=5] 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] CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; include/rpl_sync.inc ############################################################ # 2. Crash three members. [connection server3] [connection server4] [connection server5] [connection server1] include/gr_wait_for_member_state.inc member5 @ server1 is marked as UNREACHABLE include/gr_wait_for_member_state.inc member4 @ server1 is marked as UNREACHABLE include/gr_wait_for_member_state.inc member3 @ server1 is marked as UNREACHABLE [connection server2] include/gr_wait_for_member_state.inc member5 @ server2 is marked as UNREACHABLE include/gr_wait_for_member_state.inc member4 @ server2 is marked as UNREACHABLE include/gr_wait_for_member_state.inc member3 @ server2 is marked as UNREACHABLE [connection server_2] INSERT INTO t1 VALUES (2); ############################################################ # 3. Unblock the group with the alive members: server 1 and 2. [connection server1] include/assert.inc [group_replication_force_members is correct] ############################################################ # 4. Assert that group has 2 members: server 1 and 2. [connection server1] include/rpl_gr_wait_for_number_of_members.inc include/assert.inc [Server 1 must be present on group members] include/assert.inc [Server 2 must be present on group members] include/assert.inc [The value of view_id must be random:6] [connection server2] include/rpl_gr_wait_for_number_of_members.inc include/assert.inc [Server 1 must be present on group members] include/assert.inc [Server 2 must be present on group members] include/assert.inc [The value of view_id must be random:6] ############################################################ # 5. Execute a transaction in order to prove liveness and # assert that the blocked transaction was replicated in # the new configuration. [connection server_2] [connection server1] INSERT INTO t1 VALUES (1); include/sync_slave_sql_with_master.inc include/assert.inc ['There are two values in table t1'] include/diff_tables.inc [server1:test.t1, server2:test.t1] ############################################################ # 6. Clean up. [connection server_3] include/rpl_reconnect.inc include/assert.inc ['There are no values in table t1'] DROP TABLE t1; [connection server_4] include/rpl_reconnect.inc include/assert.inc ['There are no values in table t1'] DROP TABLE t1; [connection server_5] include/rpl_reconnect.inc include/assert.inc ['There are no values in table t1'] DROP TABLE t1; [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("The member resumed contact with a majority of the members in the group.*"); set session sql_log_bin=1; [connection server2] 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("The member resumed contact with a majority of the members in the group.*"); set session sql_log_bin=1; include/group_replication_end.inc