403Webshell
Server IP : 172.67.216.182  /  Your IP : 162.158.106.35
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_multi_source_parallel_channels_admin.test
# ==== Purpose ====
#
# This test will create two channels and will make one of them to be blocked
# while stopping.
#
# Then, the test case shows that it is possible to execute SHOW SLAVE STATUS
# for the channel being stopped, as well as to stop another channel.
#
# ==== Related Bugs and Worklogs ====
#
# BUG#20593028 MORE CONCURRENCY IN SHOW SLAVE STATUS: MAKE LOCK_MSR_MAP
#              AN RWLOCK

--source include/not_group_replication_plugin.inc
# This test case is binary log format agnostic
--source include/have_binlog_format_row.inc
--let $rpl_skip_start_slave= 1
--let $rpl_extra_connections_per_server= 2
--source include/master-slave.inc

# Create two slave channels
--source include/rpl_connection_slave.inc
--disable_warnings
--replace_result $MASTER_MYPORT MASTER_PORT
--eval CHANGE MASTER TO MASTER_USER='root', MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT FOR CHANNEL 'ch1'
--replace_result $MASTER_MYPORT MASTER_PORT
--eval CHANGE MASTER TO MASTER_USER='root', MASTER_HOST='dummyhost', MASTER_PORT=$MASTER_MYPORT FOR CHANNEL 'ch2'
--enable_warnings

# Start both threads of only one of the channels
--let $rpl_channel_name= ch1
--source include/start_slave.inc
# Start only the SQL thread for the other channel
--let $rpl_channel_name= ch2
--source include/start_slave_sql.inc

# Create a table on the master
--source include/rpl_connection_master.inc
CREATE TABLE t1 (c1 INT PRIMARY KEY) ENGINE=InnoDB;
--let $rpl_channel_name= ch1
--source include/sync_slave_sql_with_master.inc

# To block ch1 SQL thread
--source include/rpl_connection_slave1.inc
BEGIN;
INSERT INTO t1 VALUES (1);

# Generate data at the master to be replicated
--source include/rpl_connection_master.inc
INSERT INTO t1 VALUES (1);
# Make sure the I/O thread received the new data
--source include/sync_slave_io_with_master.inc

--send STOP SLAVE SQL_THREAD FOR CHANNEL 'ch1'

--let $rpl_connection_name= server_2_2
--source include/rpl_connection.inc
--let $ch1_sql_running=query_get_value(SHOW SLAVE STATUS FOR CHANNEL 'ch1', Slave_SQL_Running, 1)
--let $assert_cond= [ SELECT "$ch1_sql_running" = "Yes" ]
--let $assert_text= SQL thread for ch1 is running
--source include/assert.inc
--let $ch1_sql_status=query_get_value(SHOW SLAVE STATUS FOR CHANNEL 'ch1', Slave_SQL_Running_State, 1)
# This is the expected state with a non-MTS slave.
--let $cond1 = "System lock"
# This is the expected state with a MTS slave.
--let $cond2 = "Waiting for workers to exit"
# This is the expected state when server query_cache_type option is set.
--let $cond3 = "invalidating query cache entries (table)"
--let $assert_cond= [ SELECT "$ch1_sql_status" = $cond1 OR "$ch1_sql_status" = $cond2 OR "$ch1_sql_status" = $cond3 ]
--let $assert_text= SQL thread for ch1 running state is $cond1 or $cond2 or $cond3
--source include/assert.inc

--echo Stop ch2 SQL thread while stopping ch1 SQL thread
STOP SLAVE SQL_THREAD FOR CHANNEL 'ch2';
--let $rpl_channel_name= ch2
--source include/wait_for_slave_sql_to_stop.inc

--let $ch1_sql_running=query_get_value(SHOW SLAVE STATUS FOR CHANNEL 'ch1', Slave_SQL_Running, 1)
--let $assert_cond= [ SELECT "$ch1_sql_running" = "Yes" ]
--let $assert_text= SQL thread for ch1 is still running
--source include/assert.inc

# Now we can let the ch1 SQL thread to stop
--source include/rpl_connection_slave1.inc
ROLLBACK;

--source include/rpl_connection_slave.inc
--reap
--let $rpl_channel_name= ch1
--source include/wait_for_slave_sql_to_stop.inc

# Cleanup
--let $rpl_channel_name=
STOP SLAVE IO_THREAD FOR CHANNEL 'ch1';
RESET SLAVE ALL;
RESET MASTER;
DROP TABLE t1;
--disable_warnings
--replace_result $MASTER_MYPORT MASTER_PORT
--eval CHANGE MASTER TO MASTER_USER='root', MASTER_HOST='127.0.0.1', MASTER_PORT=$MASTER_MYPORT
--enable_warnings
--source include/start_slave.inc
--source include/rpl_connection_master.inc
DROP TABLE t1;
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit