Commit 4e43e2f9 authored by Alice Sherepa's avatar Alice Sherepa

MDEV-22008 rpl.rpl_semi_sync fails in bb, MDEV-24418 reenable...

MDEV-22008 rpl.rpl_semi_sync fails in bb, MDEV-24418 reenable binlog_truncate_innodb and binlog_spurious_ddl_errors, rpl_parallel_retry fails in bb
parent 83d2e084
...@@ -10,7 +10,6 @@ source include/have_innodb.inc; ...@@ -10,7 +10,6 @@ source include/have_innodb.inc;
source include/master-slave.inc; source include/master-slave.inc;
let $engine_type= InnoDB; let $engine_type= InnoDB;
#let $engine_type= MyISAM;
# Suppress warnings that might be generated during the test # Suppress warnings that might be generated during the test
connection master; connection master;
...@@ -94,7 +93,6 @@ enable_query_log; ...@@ -94,7 +93,6 @@ enable_query_log;
echo [ status of semi-sync on master should be OFF ]; echo [ status of semi-sync on master should be OFF ];
show status like 'Rpl_semi_sync_master_clients'; show status like 'Rpl_semi_sync_master_clients';
show status like 'Rpl_semi_sync_master_status'; show status like 'Rpl_semi_sync_master_status';
--replace_result 305 304
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
# reset master to make sure the following test will start with a clean environment # reset master to make sure the following test will start with a clean environment
...@@ -201,16 +199,23 @@ connection slave; ...@@ -201,16 +199,23 @@ connection slave;
source include/stop_slave.inc; source include/stop_slave.inc;
connection master; connection master;
--source include/kill_binlog_dump_threads.inc
set global rpl_semi_sync_master_timeout= 5000; set global rpl_semi_sync_master_timeout= 5000;
# The first semi-sync check should be on because after slave stop, # The first semi-sync check should be on because after slave stop,
# there are no transactions on the master. # there are no transactions on the master.
echo [ master status should be ON ]; echo [ master status should be ON ];
show status like 'Rpl_semi_sync_master_status';
let $status_var= Rpl_semi_sync_master_status;
let $status_var_value= ON;
source include/wait_for_status_var.inc;
let $status_var= Rpl_semi_sync_master_clients;
let $status_var_value= 0;
source include/wait_for_status_var.inc;
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
--replace_result 305 304
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
show status like 'Rpl_semi_sync_master_clients';
echo [ semi-sync replication of these transactions will fail ]; echo [ semi-sync replication of these transactions will fail ];
insert into t1 values (500); insert into t1 values (500);
...@@ -225,7 +230,6 @@ source include/wait_for_status_var.inc; ...@@ -225,7 +230,6 @@ source include/wait_for_status_var.inc;
echo [ master status should be OFF ]; echo [ master status should be OFF ];
show status like 'Rpl_semi_sync_master_status'; show status like 'Rpl_semi_sync_master_status';
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
--replace_result 305 304
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
# Semi-sync status on master is now OFF, so all these transactions # Semi-sync status on master is now OFF, so all these transactions
...@@ -246,7 +250,6 @@ insert into t1 values (100); ...@@ -246,7 +250,6 @@ insert into t1 values (100);
echo [ master status should be OFF ]; echo [ master status should be OFF ];
show status like 'Rpl_semi_sync_master_status'; show status like 'Rpl_semi_sync_master_status';
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
--replace_result 305 304
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
--echo # --echo #
...@@ -274,9 +277,11 @@ connection master; ...@@ -274,9 +277,11 @@ connection master;
# The master semi-sync status should be on again after slave catches up. # The master semi-sync status should be on again after slave catches up.
echo [ master status should be ON again after slave catches up ]; echo [ master status should be ON again after slave catches up ];
show status like 'Rpl_semi_sync_master_status';
let $status_var= Rpl_semi_sync_master_status;
let $status_var_value= ON;
source include/wait_for_status_var.inc;
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
--replace_result 305 304
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
show status like 'Rpl_semi_sync_master_clients'; show status like 'Rpl_semi_sync_master_clients';
...@@ -332,11 +337,7 @@ replace_result $engine_type ENGINE_TYPE; ...@@ -332,11 +337,7 @@ replace_result $engine_type ENGINE_TYPE;
eval create table t1 (a int) engine = $engine_type; eval create table t1 (a int) engine = $engine_type;
drop table t1; drop table t1;
##show status like 'Rpl_semi_sync_master_status';
sync_slave_with_master; sync_slave_with_master;
--replace_column 2 #
show status like 'Rpl_relay%';
echo [ test reset master ]; echo [ test reset master ];
connection master; connection master;
...@@ -353,19 +354,7 @@ source include/stop_slave.inc; ...@@ -353,19 +354,7 @@ source include/stop_slave.inc;
reset slave; reset slave;
# Kill the dump thread on master for previous slave connection and # Kill the dump thread on master for previous slave connection and
# wait for it to exit --source include/kill_binlog_dump_threads.inc
connection master;
let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`;
if ($_tid)
{
--replace_result $_tid _tid
eval kill query $_tid;
# After dump thread exit, Rpl_semi_sync_master_clients will be 0
let $status_var= Rpl_semi_sync_master_clients;
let $status_var_value= 0;
source include/wait_for_status_var.inc;
}
connection slave; connection slave;
source include/start_slave.inc; source include/start_slave.inc;
...@@ -404,17 +393,7 @@ connection master; ...@@ -404,17 +393,7 @@ connection master;
reset master; reset master;
# Kill the dump thread on master for previous slave connection and wait for it to exit # Kill the dump thread on master for previous slave connection and wait for it to exit
let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`; --source include/kill_binlog_dump_threads.inc
if ($_tid)
{
--replace_result $_tid _tid
eval kill query $_tid;
# After dump thread exit, Rpl_semi_sync_master_clients will be 0
let $status_var= Rpl_semi_sync_master_clients;
let $status_var_value= 0;
source include/wait_for_status_var.inc;
}
# Do not binlog the following statement because it will generate # Do not binlog the following statement because it will generate
# different events for ROW and STATEMENT format # different events for ROW and STATEMENT format
...@@ -459,21 +438,16 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; ...@@ -459,21 +438,16 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
connection master; connection master;
# Kill the dump thread on master for previous slave connection and wait for it to exit # Kill the dump thread on master for previous slave connection and wait for it to exit
let $_tid= `select id from information_schema.processlist where command = 'Binlog Dump' limit 1`; --source include/kill_binlog_dump_threads.inc
if ($_tid)
{
--replace_result $_tid _tid
eval kill query $_tid;
# After dump thread exit, Rpl_semi_sync_master_clients will be 0
let $status_var= Rpl_semi_sync_master_clients;
let $status_var_value= 0;
source include/wait_for_status_var.inc;
}
echo [ Semi-sync status on master should be ON ]; echo [ Semi-sync status on master should be ON ];
show status like 'Rpl_semi_sync_master_clients'; let $status_var= Rpl_semi_sync_master_clients;
let $status_var_value= 0;
source include/wait_for_status_var.inc;
show status like 'Rpl_semi_sync_master_status'; show status like 'Rpl_semi_sync_master_status';
let $status_var= Rpl_semi_sync_master_status;
let $status_var_value= ON;
source include/wait_for_status_var.inc;
set global rpl_semi_sync_master_enabled= 0; set global rpl_semi_sync_master_enabled= 0;
connection slave; connection slave;
......
...@@ -9,5 +9,3 @@ ...@@ -9,5 +9,3 @@
# Do not use any TAB characters for whitespace. # Do not use any TAB characters for whitespace.
# #
############################################################################## ##############################################################################
binlog_truncate_innodb : BUG#11764459 2010-10-20 anitha Originally disabled due to BUG#42643. Product bug fixed, but test changes needed
binlog_spurious_ddl_errors : BUG#11761680 2013-01-18 astha Fixed on mysql-5.6 and trunk
SET @old_binlog_format= @@global.binlog_format; SET @old_binlog_format= @@global.binlog_format;
INSTALL PLUGIN example SONAME 'ha_example.so'; INSTALL PLUGIN example SONAME 'ha_example';
################################################################################ ################################################################################
# Verifies if ER_BINLOG_STMT_MODE_AND_ROW_ENGINE happens by setting the binlog # Verifies if ER_BINLOG_STMT_MODE_AND_ROW_ENGINE happens by setting the binlog
# format to STATEMENT and the transaction isolation level to READ COMMITTED as # format to STATEMENT and the transaction isolation level to READ COMMITTED as
...@@ -18,7 +18,7 @@ ALTER TABLE t_row ADD COLUMN b INT; ...@@ -18,7 +18,7 @@ ALTER TABLE t_row ADD COLUMN b INT;
CREATE TRIGGER trig_row BEFORE INSERT ON t_row FOR EACH ROW INSERT INTO t_stmt VALUES (1); CREATE TRIGGER trig_row BEFORE INSERT ON t_row FOR EACH ROW INSERT INTO t_stmt VALUES (1);
CREATE INDEX i ON t_row(a); CREATE INDEX i ON t_row(a);
CREATE TABLE t_row_new ENGINE = InnoDB SELECT * FROM t_row; CREATE TABLE t_row_new ENGINE = InnoDB SELECT * FROM t_row;
ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED. ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging.
DROP TABLE t_row; DROP TABLE t_row;
...@@ -36,12 +36,11 @@ DROP TABLE t_row; ...@@ -36,12 +36,11 @@ DROP TABLE t_row;
SET binlog_format = ROW; SET binlog_format = ROW;
CREATE TABLE t_stmt (a VARCHAR(100)) ENGINE = EXAMPLE; CREATE TABLE t_stmt (a VARCHAR(100)) ENGINE = EXAMPLE;
ALTER TABLE t_stmt ADD COLUMN b INT; ALTER TABLE t_stmt ADD COLUMN b INT;
ERROR 42000: This version of MySQL doesn't yet support 'ALTER TABLE'
CREATE TRIGGER trig_stmt BEFORE INSERT ON t_stmt FOR EACH ROW INSERT INTO t_stmt VALUES (1); CREATE TRIGGER trig_stmt BEFORE INSERT ON t_stmt FOR EACH ROW INSERT INTO t_stmt VALUES (1);
CREATE INDEX i ON t_stmt(a); CREATE INDEX i ON t_stmt(a);
ERROR 42000: Too many key parts specified; max 0 parts allowed ERROR 42000: Too many key parts specified; max 0 parts allowed
CREATE TABLE t_stmt_new ENGINE = EXAMPLE SELECT * FROM t_stmt; CREATE TABLE t_stmt_new ENGINE = EXAMPLE SELECT * FROM t_stmt;
ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-based logging. ERROR HY000: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-based logging
DROP TABLE t_stmt; DROP TABLE t_stmt;
......
...@@ -71,7 +71,6 @@ DROP TABLE t_row; ...@@ -71,7 +71,6 @@ DROP TABLE t_row;
SET binlog_format = ROW; SET binlog_format = ROW;
CREATE TABLE t_stmt (a VARCHAR(100)) ENGINE = EXAMPLE; CREATE TABLE t_stmt (a VARCHAR(100)) ENGINE = EXAMPLE;
--error ER_NOT_SUPPORTED_YET
ALTER TABLE t_stmt ADD COLUMN b INT; ALTER TABLE t_stmt ADD COLUMN b INT;
CREATE TRIGGER trig_stmt BEFORE INSERT ON t_stmt FOR EACH ROW INSERT INTO t_stmt VALUES (1); CREATE TRIGGER trig_stmt BEFORE INSERT ON t_stmt FOR EACH ROW INSERT INTO t_stmt VALUES (1);
......
...@@ -41,4 +41,5 @@ source extra/binlog_tests/binlog_truncate.test; ...@@ -41,4 +41,5 @@ source extra/binlog_tests/binlog_truncate.test;
let $before_truncate = SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; let $before_truncate = SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
source extra/binlog_tests/binlog_truncate.test; source extra/binlog_tests/binlog_truncate.test;
SET BINLOG_FORMAT=@old_binlog_format; SET @@global.binlog_format = @old_binlog_format;
SET @@session.binlog_format = @old_binlog_format;
\ No newline at end of file
...@@ -163,20 +163,15 @@ connection slave; ...@@ -163,20 +163,15 @@ connection slave;
connection slave; connection slave;
include/stop_slave.inc include/stop_slave.inc
connection master; connection master;
include/kill_binlog_dump_threads.inc
set global rpl_semi_sync_master_timeout= 5000; set global rpl_semi_sync_master_timeout= 5000;
[ master status should be ON ] [ master status should be ON ]
show status like 'Rpl_semi_sync_master_status';
Variable_name Value
Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_no_tx 0 Rpl_semi_sync_master_no_tx 0
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_yes_tx 14 Rpl_semi_sync_master_yes_tx 14
show status like 'Rpl_semi_sync_master_clients';
Variable_name Value
Rpl_semi_sync_master_clients 1
[ semi-sync replication of these transactions will fail ] [ semi-sync replication of these transactions will fail ]
insert into t1 values (500); insert into t1 values (500);
[ master status should be OFF ] [ master status should be OFF ]
...@@ -234,9 +229,6 @@ max(a) ...@@ -234,9 +229,6 @@ max(a)
500 500
connection master; connection master;
[ master status should be ON again after slave catches up ] [ master status should be ON again after slave catches up ]
show status like 'Rpl_semi_sync_master_status';
Variable_name Value
Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_no_tx 12 Rpl_semi_sync_master_no_tx 12
...@@ -303,8 +295,6 @@ connection master; ...@@ -303,8 +295,6 @@ connection master;
create table t1 (a int) engine = ENGINE_TYPE; create table t1 (a int) engine = ENGINE_TYPE;
drop table t1; drop table t1;
connection slave; connection slave;
show status like 'Rpl_relay%';
Variable_name Value
[ test reset master ] [ test reset master ]
connection master; connection master;
reset master; reset master;
...@@ -320,8 +310,7 @@ Rpl_semi_sync_master_yes_tx 0 ...@@ -320,8 +310,7 @@ Rpl_semi_sync_master_yes_tx 0
connection slave; connection slave;
include/stop_slave.inc include/stop_slave.inc
reset slave; reset slave;
connection master; include/kill_binlog_dump_threads.inc
kill query _tid;
connection slave; connection slave;
include/start_slave.inc include/start_slave.inc
connection master; connection master;
...@@ -353,7 +342,7 @@ include/stop_slave.inc ...@@ -353,7 +342,7 @@ include/stop_slave.inc
reset slave; reset slave;
connection master; connection master;
reset master; reset master;
kill query _tid; include/kill_binlog_dump_threads.inc
set sql_log_bin=0; set sql_log_bin=0;
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password'; grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
flush privileges; flush privileges;
...@@ -404,11 +393,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; ...@@ -404,11 +393,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
Variable_name Value Variable_name Value
Rpl_semi_sync_slave_status OFF Rpl_semi_sync_slave_status OFF
connection master; connection master;
kill query _tid; include/kill_binlog_dump_threads.inc
[ Semi-sync status on master should be ON ] [ Semi-sync status on master should be ON ]
show status like 'Rpl_semi_sync_master_clients';
Variable_name Value
Rpl_semi_sync_master_clients 0
show status like 'Rpl_semi_sync_master_status'; show status like 'Rpl_semi_sync_master_status';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_status ON Rpl_semi_sync_master_status ON
......
...@@ -163,20 +163,15 @@ connection slave; ...@@ -163,20 +163,15 @@ connection slave;
connection slave; connection slave;
include/stop_slave.inc include/stop_slave.inc
connection master; connection master;
include/kill_binlog_dump_threads.inc
set global rpl_semi_sync_master_timeout= 5000; set global rpl_semi_sync_master_timeout= 5000;
[ master status should be ON ] [ master status should be ON ]
show status like 'Rpl_semi_sync_master_status';
Variable_name Value
Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_no_tx 0 Rpl_semi_sync_master_no_tx 0
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_yes_tx 14 Rpl_semi_sync_master_yes_tx 14
show status like 'Rpl_semi_sync_master_clients';
Variable_name Value
Rpl_semi_sync_master_clients 1
[ semi-sync replication of these transactions will fail ] [ semi-sync replication of these transactions will fail ]
insert into t1 values (500); insert into t1 values (500);
[ master status should be OFF ] [ master status should be OFF ]
...@@ -234,9 +229,6 @@ max(a) ...@@ -234,9 +229,6 @@ max(a)
500 500
connection master; connection master;
[ master status should be ON again after slave catches up ] [ master status should be ON again after slave catches up ]
show status like 'Rpl_semi_sync_master_status';
Variable_name Value
Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_no_tx 12 Rpl_semi_sync_master_no_tx 12
...@@ -303,8 +295,6 @@ connection master; ...@@ -303,8 +295,6 @@ connection master;
create table t1 (a int) engine = ENGINE_TYPE; create table t1 (a int) engine = ENGINE_TYPE;
drop table t1; drop table t1;
connection slave; connection slave;
show status like 'Rpl_relay%';
Variable_name Value
[ test reset master ] [ test reset master ]
connection master; connection master;
reset master; reset master;
...@@ -320,8 +310,7 @@ Rpl_semi_sync_master_yes_tx 0 ...@@ -320,8 +310,7 @@ Rpl_semi_sync_master_yes_tx 0
connection slave; connection slave;
include/stop_slave.inc include/stop_slave.inc
reset slave; reset slave;
connection master; include/kill_binlog_dump_threads.inc
kill query _tid;
connection slave; connection slave;
include/start_slave.inc include/start_slave.inc
connection master; connection master;
...@@ -353,7 +342,7 @@ include/stop_slave.inc ...@@ -353,7 +342,7 @@ include/stop_slave.inc
reset slave; reset slave;
connection master; connection master;
reset master; reset master;
kill query _tid; include/kill_binlog_dump_threads.inc
set sql_log_bin=0; set sql_log_bin=0;
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password'; grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
flush privileges; flush privileges;
...@@ -404,11 +393,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; ...@@ -404,11 +393,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
Variable_name Value Variable_name Value
Rpl_semi_sync_slave_status OFF Rpl_semi_sync_slave_status OFF
connection master; connection master;
kill query _tid; include/kill_binlog_dump_threads.inc
[ Semi-sync status on master should be ON ] [ Semi-sync status on master should be ON ]
show status like 'Rpl_semi_sync_master_clients';
Variable_name Value
Rpl_semi_sync_master_clients 0
show status like 'Rpl_semi_sync_master_status'; show status like 'Rpl_semi_sync_master_status';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_status ON Rpl_semi_sync_master_status ON
......
...@@ -164,20 +164,15 @@ connection slave; ...@@ -164,20 +164,15 @@ connection slave;
connection slave; connection slave;
include/stop_slave.inc include/stop_slave.inc
connection master; connection master;
include/kill_binlog_dump_threads.inc
set global rpl_semi_sync_master_timeout= 5000; set global rpl_semi_sync_master_timeout= 5000;
[ master status should be ON ] [ master status should be ON ]
show status like 'Rpl_semi_sync_master_status';
Variable_name Value
Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_no_tx 0 Rpl_semi_sync_master_no_tx 0
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_yes_tx 16 Rpl_semi_sync_master_yes_tx 16
show status like 'Rpl_semi_sync_master_clients';
Variable_name Value
Rpl_semi_sync_master_clients 1
[ semi-sync replication of these transactions will fail ] [ semi-sync replication of these transactions will fail ]
insert into t1 values (500); insert into t1 values (500);
[ master status should be OFF ] [ master status should be OFF ]
...@@ -235,9 +230,6 @@ max(a) ...@@ -235,9 +230,6 @@ max(a)
500 500
connection master; connection master;
[ master status should be ON again after slave catches up ] [ master status should be ON again after slave catches up ]
show status like 'Rpl_semi_sync_master_status';
Variable_name Value
Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_no_tx 12 Rpl_semi_sync_master_no_tx 12
...@@ -304,8 +296,6 @@ connection master; ...@@ -304,8 +296,6 @@ connection master;
create table t1 (a int) engine = ENGINE_TYPE; create table t1 (a int) engine = ENGINE_TYPE;
drop table t1; drop table t1;
connection slave; connection slave;
show status like 'Rpl_relay%';
Variable_name Value
[ test reset master ] [ test reset master ]
connection master; connection master;
reset master; reset master;
...@@ -321,8 +311,7 @@ Rpl_semi_sync_master_yes_tx 0 ...@@ -321,8 +311,7 @@ Rpl_semi_sync_master_yes_tx 0
connection slave; connection slave;
include/stop_slave.inc include/stop_slave.inc
reset slave; reset slave;
connection master; include/kill_binlog_dump_threads.inc
kill query _tid;
connection slave; connection slave;
include/start_slave.inc include/start_slave.inc
connection master; connection master;
...@@ -354,7 +343,7 @@ include/stop_slave.inc ...@@ -354,7 +343,7 @@ include/stop_slave.inc
reset slave; reset slave;
connection master; connection master;
reset master; reset master;
kill query _tid; include/kill_binlog_dump_threads.inc
set sql_log_bin=0; set sql_log_bin=0;
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password'; grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
flush privileges; flush privileges;
...@@ -405,11 +394,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; ...@@ -405,11 +394,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
Variable_name Value Variable_name Value
Rpl_semi_sync_slave_status OFF Rpl_semi_sync_slave_status OFF
connection master; connection master;
kill query _tid; include/kill_binlog_dump_threads.inc
[ Semi-sync status on master should be ON ] [ Semi-sync status on master should be ON ]
show status like 'Rpl_semi_sync_master_clients';
Variable_name Value
Rpl_semi_sync_master_clients 0
show status like 'Rpl_semi_sync_master_status'; show status like 'Rpl_semi_sync_master_status';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_status ON Rpl_semi_sync_master_status ON
......
...@@ -164,20 +164,15 @@ connection slave; ...@@ -164,20 +164,15 @@ connection slave;
connection slave; connection slave;
include/stop_slave.inc include/stop_slave.inc
connection master; connection master;
include/kill_binlog_dump_threads.inc
set global rpl_semi_sync_master_timeout= 5000; set global rpl_semi_sync_master_timeout= 5000;
[ master status should be ON ] [ master status should be ON ]
show status like 'Rpl_semi_sync_master_status';
Variable_name Value
Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_no_tx 0 Rpl_semi_sync_master_no_tx 0
show status like 'Rpl_semi_sync_master_yes_tx'; show status like 'Rpl_semi_sync_master_yes_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_yes_tx 14 Rpl_semi_sync_master_yes_tx 14
show status like 'Rpl_semi_sync_master_clients';
Variable_name Value
Rpl_semi_sync_master_clients 1
[ semi-sync replication of these transactions will fail ] [ semi-sync replication of these transactions will fail ]
insert into t1 values (500); insert into t1 values (500);
[ master status should be OFF ] [ master status should be OFF ]
...@@ -235,9 +230,6 @@ max(a) ...@@ -235,9 +230,6 @@ max(a)
500 500
connection master; connection master;
[ master status should be ON again after slave catches up ] [ master status should be ON again after slave catches up ]
show status like 'Rpl_semi_sync_master_status';
Variable_name Value
Rpl_semi_sync_master_status ON
show status like 'Rpl_semi_sync_master_no_tx'; show status like 'Rpl_semi_sync_master_no_tx';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_no_tx 12 Rpl_semi_sync_master_no_tx 12
...@@ -304,8 +296,6 @@ connection master; ...@@ -304,8 +296,6 @@ connection master;
create table t1 (a int) engine = ENGINE_TYPE; create table t1 (a int) engine = ENGINE_TYPE;
drop table t1; drop table t1;
connection slave; connection slave;
show status like 'Rpl_relay%';
Variable_name Value
[ test reset master ] [ test reset master ]
connection master; connection master;
reset master; reset master;
...@@ -321,8 +311,7 @@ Rpl_semi_sync_master_yes_tx 0 ...@@ -321,8 +311,7 @@ Rpl_semi_sync_master_yes_tx 0
connection slave; connection slave;
include/stop_slave.inc include/stop_slave.inc
reset slave; reset slave;
connection master; include/kill_binlog_dump_threads.inc
kill query _tid;
connection slave; connection slave;
include/start_slave.inc include/start_slave.inc
connection master; connection master;
...@@ -354,7 +343,7 @@ include/stop_slave.inc ...@@ -354,7 +343,7 @@ include/stop_slave.inc
reset slave; reset slave;
connection master; connection master;
reset master; reset master;
kill query _tid; include/kill_binlog_dump_threads.inc
set sql_log_bin=0; set sql_log_bin=0;
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password'; grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
flush privileges; flush privileges;
...@@ -405,11 +394,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status'; ...@@ -405,11 +394,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
Variable_name Value Variable_name Value
Rpl_semi_sync_slave_status OFF Rpl_semi_sync_slave_status OFF
connection master; connection master;
kill query _tid; include/kill_binlog_dump_threads.inc
[ Semi-sync status on master should be ON ] [ Semi-sync status on master should be ON ]
show status like 'Rpl_semi_sync_master_clients';
Variable_name Value
Rpl_semi_sync_master_clients 0
show status like 'Rpl_semi_sync_master_status'; show status like 'Rpl_semi_sync_master_status';
Variable_name Value Variable_name Value
Rpl_semi_sync_master_status ON Rpl_semi_sync_master_status ON
......
...@@ -436,6 +436,9 @@ SET @@DEBUG_SYNC='now SIGNAL proceed_by_1000'; ...@@ -436,6 +436,9 @@ SET @@DEBUG_SYNC='now SIGNAL proceed_by_1000';
--connection spoiler_21 --connection spoiler_21
ROLLBACK; ROLLBACK;
--let $wait_condition= SELECT count(*)=1 FROM information_schema.processlist WHERE state LIKE '%debug sync point%';
--source include/wait_condition.inc
--echo # Release the 2nd worker to proceed --echo # Release the 2nd worker to proceed
--connection spoiler_22 --connection spoiler_22
ROLLBACK; ROLLBACK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment