Server IP : 172.67.216.182 / Your IP : 162.158.162.88 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/mysql-test/suite/group_replication/t/ |
Upload File : |
################################################################################ # ==== Purpose ==== # # This test will setup a group with only two members to ensure that the GR # works regardless of performance-schema being enabled or not. # # It will first generate some workload in a single member. It will then # make the other member to join the group and recover. Once having the two # members in the group, the test case will generate workload to be certified. # # ==== Related Bugs and Worklogs ==== # # BUG#23291352 GROUP REPLICATION SEGFAULTS WHEN PERFORMANCE_SCHEMA=OFF # # Test: # 0. The test requires two servers: M1 and M2. # 1. On M1, create a table and data to be recovered. # 2. Bootstrap start a group on M1. # 3. Start GR on M2 and wait until recovered. # 4. Check if GR works fine: generate workload to be certified/replicated. # 5. Clean up: stop group replication on both members. ################################################################################ --source include/not_windows.inc --source ../inc/have_group_replication_plugin.inc --let $rpl_skip_group_replication_start= 1 --source ../inc/group_replication.inc --echo --echo #################################################################### --echo # 1. Create a table on server1 and generate workload to be recovered CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); --echo --echo ################################################################# --echo # 2. Start group replication on server1, bootstrapping the group --replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME --eval SET GLOBAL group_replication_group_name= "$group_replication_group_name" --source ../inc/gr_set_bootstrap_group.inc START GROUP_REPLICATION; --source ../inc/gr_clear_bootstrap_group.inc --echo --echo ################################################################# --echo # 3. Start group replication on server2 and wait until recovered --let $rpl_connection_name= server2 --source include/rpl_connection.inc --replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME --eval SET GLOBAL group_replication_group_name= "$group_replication_group_name" START GROUP_REPLICATION; --echo Wait until server2 recovered table t1 --let $wait_condition= SELECT COUNT(*)=1 FROM information_schema.tables WHERE TABLE_SCHEMA="test" AND TABLE_NAME="t1"; --source include/wait_condition.inc --echo Wait until server2 recovered the single row of table t1 --let $wait_condition= SELECT COUNT(*)=1 FROM t1 --source include/wait_condition.inc --echo Wait until server2 recovery has finished --let $wait_condition= SELECT @@GLOBAL.super_read_only = '0' --source include/wait_condition.inc --echo --echo ######################################################################### --echo # 4. Check if GR works fine: generate workload to be certified/replicated INSERT INTO t1 VALUES (2); --let $rpl_connection_name= server1 --source include/rpl_connection.inc --echo Wait until server1 has the table with 2 rows --let $wait_condition= SELECT COUNT(*)=2 FROM t1 --source include/wait_condition.inc DROP TABLE t1; --let $rpl_connection_name= server2 --source include/rpl_connection.inc --echo Wait until server2 has dropped table t1 --let $wait_condition= SELECT COUNT(*)=0 FROM information_schema.tables WHERE TABLE_SCHEMA="test" AND TABLE_NAME="t1"; --source include/wait_condition.inc --echo --echo ##################################################### --echo # 5. Clean up: stop group replication on both members STOP GROUP_REPLICATION; --let $rpl_connection_name= server1 --source include/rpl_connection.inc STOP GROUP_REPLICATION; --source ../inc/group_replication_end.inc