403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.70.92.156
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_pipeline_applier_error.test
################################################################################
# Check that pipeline errors are properly detected and handled.
#
# Test:
# 0. The test requires two servers: M1 and M2.
# 1. Setup a group with two members. Bootstrap group with M2. Start GR on M1.
# 2. Execute some transactions on M1 that will be applied through M2 Group
#    Replication applier that is forced to fail using DEBUG point.
#  - Wait until M2 Group Replication applier errors out.
#  - Reset debug flag on M2.
# 3. Commit a transaction to validate that everything is OK.
# 4. Check that GTID_EXECUTED on M1 contains all transactions. Also check that
#    data is on tables.
# 5. Check that GTID_EXECUTED on M2 contains all transactions. Also check that
#    data is on tables.
# 6. Clean up.
################################################################################
--source include/have_debug.inc
--source ../inc/have_group_replication_plugin.inc

--echo
--echo ############################################################
--echo # 1.  Setup a new group with two members.
--echo #
--let $rpl_skip_group_replication_start= 1
--source ../inc/group_replication.inc

--let $rpl_connection_name= server2
--source include/rpl_connection.inc

SET SESSION sql_log_bin= 0;
call mtr.add_suppression("Failed to fetch transaction data containing required transaction info for applier");
call mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group.");
call mtr.add_suppression("Error at event handling! Got error: 1");
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected.");
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going.");
SET SESSION sql_log_bin= 1;

--source ../inc/start_and_bootstrap_group_replication.inc

--echo ############################################################
--echo # 2.  Execute some transactions on member 1 that will be
--echo #     applied through member 2 Group Replication applier
--echo #     that is forced to fail.
--echo #
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--source include/start_group_replication.inc

--echo
--echo # On member 2 we force a pipeline error on applier
--echo # handler.
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
SET @debug_saved= @@GLOBAL.DEBUG;
SET @@GLOBAL.DEBUG= '+d,applier_handler_force_error_on_pipeline';

--let $rpl_connection_name= server1
--source include/rpl_connection.inc
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;

--echo
--echo # Wait until member 2 Group Replication applier errors out.
--echo #
--let $rpl_connection_name= server2
--source include/rpl_connection.inc

--let $wait_condition= SELECT service_state="OFF" FROM performance_schema.replication_applier_status WHERE channel_name="group_replication_applier"
--source include/wait_condition.inc

--echo
--echo # Reset debug flag.
--echo #
--source include/stop_group_replication.inc
SET @@GLOBAL.DEBUG= @debug_saved;
--source include/start_group_replication.inc

--echo
--echo ############################################################
--echo # 3.  Commit a transaction to validate that everything is OK
--echo #
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
INSERT INTO t1 VALUES (1);
--source include/rpl_sync.inc


--echo
--echo ############################################################
--echo # 4.  Check that GTID_EXECUTED on server 1 contains all
--echo #     transactions.
--echo #     Also check that data is on tables.
--let $rpl_connection_name= server1
--source include/rpl_connection.inc
--let $assert_text= GTID_EXECUTED must contain all committed GTIDs
--let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "$group_replication_group_name:1-5"
--source include/assert.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.  Check that GTID_EXECUTED on server 2 contains all
--echo #     transactions.
--echo #     Also check that data is on tables.
--let $rpl_connection_name= server2
--source include/rpl_connection.inc
--let $assert_text= GTID_EXECUTED must contain all committed GTIDs
--let $assert_cond= "[SELECT @@GLOBAL.GTID_EXECUTED]" = "$group_replication_group_name:1-5"
--source include/assert.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 # 6.  Test cleanup.
--echo #
DROP TABLE t1;
--source ../inc/group_replication_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit