Server IP : 172.67.216.182 / Your IP : 172.70.208.96 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 : |
################################################################################ # Group replication test that asserts that servers do not repeat View change # events in their binlogs. # This happened in: # Recovery rounds where the events were received a second time but not skipped # Plugin restarts where the applier relay log would be replayed. # # To test this, in a group several view changes are executed, and along side # them we check in one of the servers that only the expected view events are # written. # # Test: # 0. The test requires three servers: M1, M2 and M3. # 1. Bootstrap group with M1. Create table t1 on M1. Start GR on M2. Check that # M2 recieves view change from M1, create table, view change by M2. # 2. Make M2 leave and join again. Check that exists one more event after join # in the binlog. # 3. Stop GR on M2. Join and leave M3. Start GR on M2. Check on M2 it should # receive 1 view change transaction from M3 and write 1 other. # 4. Clean up. ################################################################################ --source include/big_test.inc --source ../inc/have_group_replication_plugin.inc --let $rpl_skip_group_replication_start= 1 --let $rpl_server_count= 3 --source ../inc/group_replication.inc # The sequence of events that make up a View Change --let $vcle_seq= Gtid # Query/BEGIN # View_change # Query/COMMIT --echo # --echo # Setup a new group with two servers. --echo # Check that server 2 receives a view event and writes another one --echo # --connection server1 --echo server1 --source ../inc/start_and_bootstrap_group_replication.inc CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; --connection server2 --echo server2 --source include/start_group_replication.inc # View change (received from s1) # Create table # View change (written by s2) --let $event_sequence= $vcle_seq # !Gtid_transaction # $vcle_seq --source include/assert_binlog_events.inc --echo # --echo # Make server 2 leave and enter generating one more view change event --echo # Check that only one view change transaction is written to the binlog --echo # --connection server2 --echo server2 --source include/stop_group_replication.inc # No event should be written in the binlog --let $event_sequence= $event_sequence --source include/assert_binlog_events.inc --source include/start_group_replication.inc # One more event after joining: # Previous events # View change (s2 joined) --let $event_sequence= $event_sequence # $vcle_seq --source include/assert_binlog_events.inc --echo # --echo # Make server 3 join and leave while server 2 was away --echo # Server 2 should receive 1 view change transaction from recovery and --echo # write another --echo # --connection server2 --echo server2 --source include/stop_group_replication.inc --connection server3 --echo server3 --source include/start_group_replication.inc --source include/stop_group_replication.inc --connection server2 --echo server2 --source include/start_group_replication.inc # Previous events # View change (3 joined) # View change (2 joined) --let $event_sequence= $event_sequence # $vcle_seq # $vcle_seq --source include/assert_binlog_events.inc --echo # --echo # Cleaning up --echo # --connection server3 --echo server3 --source include/start_group_replication.inc DROP TABLE t1; --source ../inc/group_replication_end.inc