WordPress

Briefly unavailable for scheduled maintenance.
Check back in a some hours.
Uname:Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64

Base Dir : /var/www/eduesan

User : www-data


403WebShell
403Webshell
Server IP : 202.131.237.196  /  Your IP : 216.73.216.192
Web Server : nginx/1.14.0
System : Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.2.24-0ubuntu0.18.04.17
Disable Function : 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/mysql-test/extra/rpl_tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/mysql-test/extra/rpl_tests/rpl_stop_middle_group.test
# Proving that stopping in the middle of applying a group of events
# does not have immediate effect if a non-transaction table has been changed.
# The slave sql thread has to try to finish applying first.
# The tests rely on simulation of the killed status.
# The matter of testing correlates to some of `rpl_start_stop_slave' that does
# not require `have_debug'.

connection master;

call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");

create table tm (a int auto_increment primary key) engine=myisam;
create table ti (a int auto_increment primary key) engine=innodb;

sync_slave_with_master;
set @@global.debug="+d,stop_slave_middle_group";

connection master;

begin;
insert into ti set a=null;
insert into tm set a=null; # to simulate killed status on the slave 
commit;

connection slave;
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
call mtr.add_suppression("Slave SQL.*Slave SQL Thread stopped with incomplete event group having non-transactional changes");

# slave will catch the killed status but won't shut down immediately
# only after the whole group has done (commit)

source include/wait_for_slave_sql_to_stop.inc;

# checking: no error and the group is finished

let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
let $read = query_get_value("SHOW SLAVE STATUS", Read_Master_Log_Pos, 1);
let $exec = query_get_value("SHOW SLAVE STATUS", Exec_Master_Log_Pos, 1);
--disable_query_log
eval SELECT $read = $exec into @check;
--enable_query_log
eval SELECT "NO$error" AS Last_SQL_Error, @check as `true`;
select count(*) as one from tm;
select count(*) as one from ti;

set @@global.debug="-d";

#
# bug#45940 issues around rli->last_event_start_time
# Testing of slave stopped after it had waited (in vain) for
# the group be finished.
# It could not be finished because of simulation of failure to
# receive the terminal part
# The test relay on simulation of the incomplete group in the relay log

# Two cases are verified: a mixed transacton and a mixed multi-table update.
#
# The mixed transacton.
#
source include/start_slave.inc;

connection master;

truncate table tm; # cleanup of former tests
truncate table ti;

#connection slave;
sync_slave_with_master;

set @@global.debug="+d,stop_slave_middle_group";
set @@global.debug="+d,incomplete_group_in_relay_log";

connection master;

begin;
insert into ti set a=null;
insert into tm set a=null;
commit;

connection slave;

# slave will catch the killed status, won't shut down immediately
# but does it eventually having the whole group unfinished (not committed)

source include/wait_for_slave_sql_to_stop.inc;

# checking: the error and group unfinished

let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
let $read = query_get_value("SHOW SLAVE STATUS", Read_Master_Log_Pos, 1);
let $exec = query_get_value("SHOW SLAVE STATUS", Exec_Master_Log_Pos, 1);
--disable_query_log
eval SELECT $read - $exec > 0 into @check;
--enable_query_log
eval SELECT "$error" AS Last_SQL_Error, @check as `true`;
select count(*) as one  from tm;
select count(*) as zero from ti;

set @@global.debug="-d";

#
# The mixed multi-table update
#
stop slave;
truncate table tm;
source include/start_slave.inc;

connection master;

#connection slave;
sync_slave_with_master;
set @@global.debug="+d,stop_slave_middle_group";
set @@global.debug="+d,incomplete_group_in_relay_log";

connection master;
update tm as t1, ti as t2 set t1.a=t1.a * 2, t2.a=t2.a * 2;

connection slave;

# slave will catch the killed status, won't shut down immediately
# but does it eventually having the whole group unfinished (not committed)
# 

source include/wait_for_slave_sql_to_stop.inc;

# checking: the error and group unfinished 

let $error= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
let $read = query_get_value("SHOW SLAVE STATUS", Read_Master_Log_Pos, 1);
let $exec = query_get_value("SHOW SLAVE STATUS", Exec_Master_Log_Pos, 1);
--disable_query_log
eval SELECT $read - $exec > 0 into @check;
--enable_query_log
eval SELECT "$error" AS Last_SQL_Error, @check as `true`;
select max(a) as two from tm;
select max(a) as one from ti;

set @@global.debug="-d";

#
# clean-up
#

# the sql thread has an error, so reset replication state
--let $rpl_only_running_threads= 1
--source include/rpl_reset.inc

connection master;
drop table tm, ti;
--sync_slave_with_master

Youez - 2016 - github.com/yon3zu
LinuXploit