Server IP : 172.67.216.182 / Your IP : 172.70.188.80 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 : |
################################################################################ # BUG#21180035 - ADD SUPPORT TO SKIP GTIDS ON GROUP REPLICATION # # CASE II - A member joins after the specified GTID next in the group. # # Test: # 0) The test requires two servers: M1 and M2. # 1) Bootstrap start a group on M1. First view change is UUID_GROUP:1. # 2) On M1, executes a transaction with GTID_NEXT=UUID_GROUP:3. # Check gtid_executed=UUID_GROUP:1:3. # 3) Start GR on M2. Check gtid_executed=UUID_GROUP:1-3. # 4) Check gtid_executed=UUID_GROUP:1-3 on M1 too. # 5) On M1 execute a transaction, it will have: # M1: UUID_GROUP:4 # M2: UUID_GROUP:4 should be generated. # 6) Check gtid_executed on M1. It must be UUID_GROUP:1-4. # 7) Verify sequence of events in binlog of both M1 and M2. # 8) Check gtid_executed on M2. It must be UUID_GROUP:1-4. # 9) Cleanup. ################################################################################ --let $group_replication_group_name= 32e153f8-01d2-11e6-a992-02420ef39c5b --source ../inc/have_group_replication_plugin.inc --let $rpl_skip_group_replication_start= 1 --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 --let $rpl_connection_name= server1 --source include/rpl_connection.inc SET SESSION sql_log_bin= 0; --source include/gtid_utils.inc SET SESSION sql_log_bin= 1; --let $rpl_connection_name= server2 --source include/rpl_connection.inc SET SESSION sql_log_bin= 0; --source include/gtid_utils.inc SET SESSION sql_log_bin= 1; --let $rpl_connection_name= server1 --source include/rpl_connection.inc --source ../inc/start_and_bootstrap_group_replication.inc --eval SET GTID_NEXT= "$group_replication_group_name:3" # Applying a transaction with UUID_GROUP:3 set which will be skipped later in # the test. CREATE TABLE t1 (i INT PRIMARY KEY); --source include/rpl_sync.inc SET GTID_NEXT='AUTOMATIC'; --let $assert_text= GTID_EXECUTED must contain two transactions, one from view change and other being the create table. --let $assert_cond= GTID_IS_EQUAL(@@GLOBAL.GTID_EXECUTED,"$group_replication_group_name:1:3") --source include/assert.inc # Starting group_replication on server2. This will trigger the next sequence # number to be generated on server1 thereby increasing the sequence number to # 3 on both the servers. --let $rpl_connection_name= server2 --source include/rpl_connection.inc --source include/start_group_replication.inc # Checking the GTID_EXECUTED on the server2. This should be UUID_GROUP:1-3 # here as well. --let $assert_text= GTID_EXECUTED must contain three transactions, two from view change and other being the create. --let $assert_cond= GTID_IS_EQUAL(@@GLOBAL.GTID_EXECUTED,"$group_replication_group_name:1-3") --source include/assert.inc --let $rpl_connection_name= server1 --source include/rpl_connection.inc # Checking the GTID_EXECUTED on the server1. This should be UUID_GROUP:1-3 # here as well. --let $assert_text= GTID_EXECUTED must contain three transactions, two from view change and other being the create. --let $assert_cond= GTID_IS_EQUAL(@@GLOBAL.GTID_EXECUTED,"$group_replication_group_name:1-3") --source include/assert.inc # Insert a row in the table t1. This will create a new GTID which will skip as # the next seqno is conflicting with the one already logged. So UUID_GROUP:4 # will be generated. --let $rpl_connection_name= server1 --source include/rpl_connection.inc INSERT INTO t1 VALUES(1); --source include/rpl_sync.inc --let $assert_text= GTID_EXECUTED must contain four transactions, the new one from the insert. --let $assert_cond= GTID_IS_EQUAL(@@GLOBAL.GTID_EXECUTED,"$group_replication_group_name:1-4") --source include/assert.inc # View change (s1) # Create table # View change (s2) # Insert table --let $event_sequence= $vcle_seq # Gtid # !Q(CREATE.*) # $vcle_seq # Gtid # !Begin # Table_map # Write_rows # !Commit --source include/assert_binlog_events.inc --let $rpl_connection_name= server2 --source include/rpl_connection.inc # View change (s1) # Create table # View change (s2) # Insert table --let $event_sequence= $vcle_seq # Gtid # !Q(CREATE.*) # $vcle_seq # Gtid # !Begin # Table_map # Write_rows # !Commit --source include/assert_binlog_events.inc --let $assert_text= GTID_EXECUTED must contain four transactions, the new one from the insert. --let $assert_cond= GTID_IS_EQUAL(@@GLOBAL.GTID_EXECUTED,"$group_replication_group_name:1-4") --source include/assert.inc # Cleanup DROP TABLE t1; --let $rpl_connection_name= server1 --source include/rpl_connection.inc SET SESSION sql_log_bin= 0; --source include/gtid_utils_end.inc SET SESSION sql_log_bin= 1; --let $rpl_connection_name= server2 --source include/rpl_connection.inc SET SESSION sql_log_bin= 0; --source include/gtid_utils_end.inc SET SESSION sql_log_bin= 1; --source ../inc/group_replication_end.inc