403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.71.124.153
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/mysql-test/suite/rpl/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/rpl/t/rpl_gtid_huge_gtid_set.test
# ==== Purpose ====
#
# This test will validate that huge GTID_EXECUTED values are properly
# handled on asynchronous replication.
#
# ==== Related Bugs and Worklogs ====
#
# BUG#22369630 GTID_SET TO_STRING MALLOC ISSUE FOR LARGE SETS
#
--source include/have_gtid.inc
--source include/master-slave.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
--disable_query_log
--let $gno= 99998
--let $gno_number= 10001
while ($gno_number > 0)
{
  --let $gno= `SELECT $gno + 2`
  --eval SET GTID_NEXT= 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:$gno'
  BEGIN;
  COMMIT;
  --dec $gno_number
}
SET GTID_NEXT = 'AUTOMATIC';
--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 # 2. Sync slave.
--source include/sync_slave_sql_with_master.inc

--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. Execute some transactions and check that nothing bad happens.
--echo #    Validate that data is delivered to both servers.
--source include/rpl_connection_master.inc
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
--source include/rpl_sync.inc

--source include/rpl_connection_master.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

--source include/rpl_connection_slave.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 # 4. Check that Retrieved transaction set it is equal to
--echo #    GTID_EXECUTED.
--let $assert_text= 'Transactions_committed_all_members must be equal to GTID_EXECUTED'
--let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "[SELECT Received_Transaction_Set from performance_schema.replication_connection_status]"
--source include/assert.inc


--echo
--echo ############################################################
--echo # 5. Clean up.
--let $rpl_connection_name= master
--source include/rpl_connection_master.inc
DROP TABLE t1;
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit