mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
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
This commit is contained in:
parent
83d2e0841e
commit
4e43e2f92d
13 changed files with 157 additions and 206 deletions
|
@ -10,7 +10,6 @@ source include/have_innodb.inc;
|
|||
source include/master-slave.inc;
|
||||
|
||||
let $engine_type= InnoDB;
|
||||
#let $engine_type= MyISAM;
|
||||
|
||||
# Suppress warnings that might be generated during the test
|
||||
connection master;
|
||||
|
@ -94,7 +93,6 @@ enable_query_log;
|
|||
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_status';
|
||||
--replace_result 305 304
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
|
||||
# reset master to make sure the following test will start with a clean environment
|
||||
|
@ -201,16 +199,23 @@ connection slave;
|
|||
source include/stop_slave.inc;
|
||||
|
||||
connection master;
|
||||
--source include/kill_binlog_dump_threads.inc
|
||||
set global rpl_semi_sync_master_timeout= 5000;
|
||||
|
||||
# The first semi-sync check should be on because after slave stop,
|
||||
# there are no transactions on the master.
|
||||
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';
|
||||
--replace_result 305 304
|
||||
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 ];
|
||||
insert into t1 values (500);
|
||||
|
@ -225,7 +230,6 @@ source include/wait_for_status_var.inc;
|
|||
echo [ master status should be OFF ];
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
show status like 'Rpl_semi_sync_master_no_tx';
|
||||
--replace_result 305 304
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
|
||||
# Semi-sync status on master is now OFF, so all these transactions
|
||||
|
@ -246,7 +250,6 @@ insert into t1 values (100);
|
|||
echo [ master status should be OFF ];
|
||||
show status like 'Rpl_semi_sync_master_status';
|
||||
show status like 'Rpl_semi_sync_master_no_tx';
|
||||
--replace_result 305 304
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
|
||||
--echo #
|
||||
|
@ -274,9 +277,11 @@ connection master;
|
|||
|
||||
# The master semi-sync 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';
|
||||
--replace_result 305 304
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
show status like 'Rpl_semi_sync_master_clients';
|
||||
|
||||
|
@ -332,11 +337,7 @@ replace_result $engine_type ENGINE_TYPE;
|
|||
eval create table t1 (a int) engine = $engine_type;
|
||||
drop table t1;
|
||||
|
||||
##show status like 'Rpl_semi_sync_master_status';
|
||||
|
||||
sync_slave_with_master;
|
||||
--replace_column 2 #
|
||||
show status like 'Rpl_relay%';
|
||||
|
||||
echo [ test reset master ];
|
||||
connection master;
|
||||
|
@ -353,19 +354,7 @@ source include/stop_slave.inc;
|
|||
reset slave;
|
||||
|
||||
# Kill the dump thread on master for previous slave connection and
|
||||
# wait for it to exit
|
||||
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;
|
||||
}
|
||||
--source include/kill_binlog_dump_threads.inc
|
||||
|
||||
connection slave;
|
||||
source include/start_slave.inc;
|
||||
|
@ -404,17 +393,7 @@ connection master;
|
|||
reset master;
|
||||
|
||||
# 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`;
|
||||
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;
|
||||
}
|
||||
--source include/kill_binlog_dump_threads.inc
|
||||
|
||||
# Do not binlog the following statement because it will generate
|
||||
# different events for ROW and STATEMENT format
|
||||
|
@ -459,21 +438,16 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
|
|||
connection master;
|
||||
|
||||
# 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`;
|
||||
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;
|
||||
}
|
||||
--source include/kill_binlog_dump_threads.inc
|
||||
|
||||
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';
|
||||
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;
|
||||
|
||||
connection slave;
|
||||
|
|
|
@ -9,5 +9,3 @@
|
|||
# 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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
|
||||
# format to STATEMENT and the transaction isolation level to READ COMMITTED as
|
||||
|
@ -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 INDEX i ON t_row(a);
|
||||
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;
|
||||
|
||||
|
||||
|
@ -36,12 +36,11 @@ DROP TABLE t_row;
|
|||
SET binlog_format = ROW;
|
||||
CREATE TABLE t_stmt (a VARCHAR(100)) ENGINE = EXAMPLE;
|
||||
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 INDEX i ON t_stmt(a);
|
||||
ERROR 42000: Too many key parts specified; max 0 parts allowed
|
||||
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;
|
||||
|
||||
|
||||
|
|
|
@ -7,9 +7,11 @@ INSERT INTO t2 VALUES (1),(2),(3);
|
|||
**** Truncate of empty table shall be logged
|
||||
TRUNCATE TABLE t1;
|
||||
TRUNCATE TABLE t2;
|
||||
show binlog events from <binlog_start>;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
|
@ -18,18 +20,17 @@ DROP TABLE t1,t2;
|
|||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
# Connection: default
|
||||
BEGIN;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
# Connection: truncate
|
||||
connect truncate,localhost,root,,;
|
||||
TRUNCATE TABLE t1;
|
||||
# Connection: default
|
||||
connection default;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
COMMIT;
|
||||
# Connection: truncate
|
||||
connection truncate;
|
||||
# Reaping TRUNCATE TABLE
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
|
@ -37,16 +38,20 @@ COUNT(*)
|
|||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
# Connection: default
|
||||
show binlog events from <binlog_start>;
|
||||
connection default;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
disconnect truncate;
|
||||
DROP TABLE t1,t2;
|
||||
# Even though the isolation level might be permissive, truncate
|
||||
# table follows a stricter isolation as its locking is based on
|
||||
|
@ -59,9 +64,11 @@ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
|||
TRUNCATE TABLE t1;
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
TRUNCATE TABLE t2;
|
||||
show binlog events from <binlog_start>;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
|
@ -71,18 +78,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
|||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
||||
# Connection: default
|
||||
BEGIN;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
# Connection: truncate
|
||||
connect truncate,localhost,root,,;
|
||||
TRUNCATE TABLE t1;
|
||||
# Connection: default
|
||||
connection default;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
COMMIT;
|
||||
# Connection: truncate
|
||||
connection truncate;
|
||||
# Reaping TRUNCATE TABLE
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
|
@ -90,16 +96,20 @@ COUNT(*)
|
|||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
# Connection: default
|
||||
show binlog events from <binlog_start>;
|
||||
connection default;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
disconnect truncate;
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
|
@ -109,9 +119,11 @@ SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
|||
TRUNCATE TABLE t1;
|
||||
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
TRUNCATE TABLE t2;
|
||||
show binlog events from <binlog_start>;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
|
@ -121,18 +133,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
|||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
|
||||
# Connection: default
|
||||
BEGIN;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
# Connection: truncate
|
||||
connect truncate,localhost,root,,;
|
||||
TRUNCATE TABLE t1;
|
||||
# Connection: default
|
||||
connection default;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
COMMIT;
|
||||
# Connection: truncate
|
||||
connection truncate;
|
||||
# Reaping TRUNCATE TABLE
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
|
@ -140,16 +151,20 @@ COUNT(*)
|
|||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
# Connection: default
|
||||
show binlog events from <binlog_start>;
|
||||
connection default;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
disconnect truncate;
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
|
@ -159,9 +174,11 @@ SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
|||
TRUNCATE TABLE t1;
|
||||
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
TRUNCATE TABLE t2;
|
||||
show binlog events from <binlog_start>;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
|
@ -171,18 +188,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
|||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
# Connection: default
|
||||
BEGIN;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
# Connection: truncate
|
||||
connect truncate,localhost,root,,;
|
||||
TRUNCATE TABLE t1;
|
||||
# Connection: default
|
||||
connection default;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
COMMIT;
|
||||
# Connection: truncate
|
||||
connection truncate;
|
||||
# Reaping TRUNCATE TABLE
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
|
@ -190,16 +206,20 @@ COUNT(*)
|
|||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
# Connection: default
|
||||
show binlog events from <binlog_start>;
|
||||
connection default;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
disconnect truncate;
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
|
@ -209,9 +229,11 @@ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
|||
TRUNCATE TABLE t1;
|
||||
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
TRUNCATE TABLE t2;
|
||||
show binlog events from <binlog_start>;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
|
@ -221,18 +243,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
|||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
# Connection: default
|
||||
BEGIN;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
# Connection: truncate
|
||||
connect truncate,localhost,root,,;
|
||||
TRUNCATE TABLE t1;
|
||||
# Connection: default
|
||||
connection default;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
COMMIT;
|
||||
# Connection: truncate
|
||||
connection truncate;
|
||||
# Reaping TRUNCATE TABLE
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
|
@ -240,16 +261,20 @@ COUNT(*)
|
|||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
# Connection: default
|
||||
show binlog events from <binlog_start>;
|
||||
connection default;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Annotate_rows # # INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t2)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
disconnect truncate;
|
||||
DROP TABLE t1,t2;
|
||||
SET BINLOG_FORMAT=STATEMENT;
|
||||
RESET MASTER;
|
||||
|
@ -261,9 +286,11 @@ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
|||
TRUNCATE TABLE t1;
|
||||
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
TRUNCATE TABLE t2;
|
||||
show binlog events from <binlog_start>;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
|
@ -273,18 +300,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
|||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
# Connection: default
|
||||
BEGIN;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
# Connection: truncate
|
||||
connect truncate,localhost,root,,;
|
||||
TRUNCATE TABLE t1;
|
||||
# Connection: default
|
||||
connection default;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
COMMIT;
|
||||
# Connection: truncate
|
||||
connection truncate;
|
||||
# Reaping TRUNCATE TABLE
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
|
@ -292,14 +318,16 @@ COUNT(*)
|
|||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
# Connection: default
|
||||
show binlog events from <binlog_start>;
|
||||
connection default;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
disconnect truncate;
|
||||
DROP TABLE t1,t2;
|
||||
# Truncate is not supported for SBR if the isolation level is
|
||||
# READ UNCOMMITTED or READ COMMITTED. These specific isolation
|
||||
|
@ -312,9 +340,11 @@ SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
|||
TRUNCATE TABLE t1;
|
||||
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
TRUNCATE TABLE t2;
|
||||
show binlog events from <binlog_start>;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
|
@ -324,18 +354,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
|||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
||||
# Connection: default
|
||||
BEGIN;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
# Connection: truncate
|
||||
connect truncate,localhost,root,,;
|
||||
TRUNCATE TABLE t1;
|
||||
# Connection: default
|
||||
connection default;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
COMMIT;
|
||||
# Connection: truncate
|
||||
connection truncate;
|
||||
# Reaping TRUNCATE TABLE
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
|
@ -343,14 +372,16 @@ COUNT(*)
|
|||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
# Connection: default
|
||||
show binlog events from <binlog_start>;
|
||||
connection default;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
disconnect truncate;
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
|
@ -360,9 +391,11 @@ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
|||
TRUNCATE TABLE t1;
|
||||
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
TRUNCATE TABLE t2;
|
||||
show binlog events from <binlog_start>;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t2
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
|
@ -372,18 +405,17 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
|||
CREATE TABLE t2 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
# Connection: default
|
||||
BEGIN;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
# Connection: truncate
|
||||
connect truncate,localhost,root,,;
|
||||
TRUNCATE TABLE t1;
|
||||
# Connection: default
|
||||
connection default;
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
COMMIT;
|
||||
# Connection: truncate
|
||||
connection truncate;
|
||||
# Reaping TRUNCATE TABLE
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
|
@ -391,13 +423,16 @@ COUNT(*)
|
|||
SELECT COUNT(*) FROM t2;
|
||||
COUNT(*)
|
||||
4
|
||||
# Connection: default
|
||||
show binlog events from <binlog_start>;
|
||||
connection default;
|
||||
include/show_binlog_events.inc
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t2 SELECT * FROM t1
|
||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1
|
||||
disconnect truncate;
|
||||
DROP TABLE t1,t2;
|
||||
SET BINLOG_FORMAT=@old_binlog_format;
|
||||
SET @@global.binlog_format = @old_binlog_format;
|
||||
SET @@session.binlog_format = @old_binlog_format;
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
--innodb
|
|
@ -71,7 +71,6 @@ DROP TABLE t_row;
|
|||
SET binlog_format = ROW;
|
||||
CREATE TABLE t_stmt (a VARCHAR(100)) ENGINE = EXAMPLE;
|
||||
|
||||
--error ER_NOT_SUPPORTED_YET
|
||||
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);
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
--loose-innodb
|
|
@ -41,4 +41,5 @@ source extra/binlog_tests/binlog_truncate.test;
|
|||
let $before_truncate = SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
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;
|
|
@ -163,20 +163,15 @@ connection slave;
|
|||
connection slave;
|
||||
include/stop_slave.inc
|
||||
connection master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set global rpl_semi_sync_master_timeout= 5000;
|
||||
[ 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';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 0
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
Variable_name Value
|
||||
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 ]
|
||||
insert into t1 values (500);
|
||||
[ master status should be OFF ]
|
||||
|
@ -234,9 +229,6 @@ max(a)
|
|||
500
|
||||
connection master;
|
||||
[ 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';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 12
|
||||
|
@ -303,8 +295,6 @@ connection master;
|
|||
create table t1 (a int) engine = ENGINE_TYPE;
|
||||
drop table t1;
|
||||
connection slave;
|
||||
show status like 'Rpl_relay%';
|
||||
Variable_name Value
|
||||
[ test reset master ]
|
||||
connection master;
|
||||
reset master;
|
||||
|
@ -320,8 +310,7 @@ Rpl_semi_sync_master_yes_tx 0
|
|||
connection slave;
|
||||
include/stop_slave.inc
|
||||
reset slave;
|
||||
connection master;
|
||||
kill query _tid;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
connection slave;
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
|
@ -353,7 +342,7 @@ include/stop_slave.inc
|
|||
reset slave;
|
||||
connection master;
|
||||
reset master;
|
||||
kill query _tid;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set sql_log_bin=0;
|
||||
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
|
||||
flush privileges;
|
||||
|
@ -404,11 +393,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
|
|||
Variable_name Value
|
||||
Rpl_semi_sync_slave_status OFF
|
||||
connection master;
|
||||
kill query _tid;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
[ 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';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
|
|
|
@ -163,20 +163,15 @@ connection slave;
|
|||
connection slave;
|
||||
include/stop_slave.inc
|
||||
connection master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set global rpl_semi_sync_master_timeout= 5000;
|
||||
[ 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';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 0
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
Variable_name Value
|
||||
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 ]
|
||||
insert into t1 values (500);
|
||||
[ master status should be OFF ]
|
||||
|
@ -234,9 +229,6 @@ max(a)
|
|||
500
|
||||
connection master;
|
||||
[ 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';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 12
|
||||
|
@ -303,8 +295,6 @@ connection master;
|
|||
create table t1 (a int) engine = ENGINE_TYPE;
|
||||
drop table t1;
|
||||
connection slave;
|
||||
show status like 'Rpl_relay%';
|
||||
Variable_name Value
|
||||
[ test reset master ]
|
||||
connection master;
|
||||
reset master;
|
||||
|
@ -320,8 +310,7 @@ Rpl_semi_sync_master_yes_tx 0
|
|||
connection slave;
|
||||
include/stop_slave.inc
|
||||
reset slave;
|
||||
connection master;
|
||||
kill query _tid;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
connection slave;
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
|
@ -353,7 +342,7 @@ include/stop_slave.inc
|
|||
reset slave;
|
||||
connection master;
|
||||
reset master;
|
||||
kill query _tid;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set sql_log_bin=0;
|
||||
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
|
||||
flush privileges;
|
||||
|
@ -404,11 +393,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
|
|||
Variable_name Value
|
||||
Rpl_semi_sync_slave_status OFF
|
||||
connection master;
|
||||
kill query _tid;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
[ 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';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
|
|
|
@ -164,20 +164,15 @@ connection slave;
|
|||
connection slave;
|
||||
include/stop_slave.inc
|
||||
connection master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set global rpl_semi_sync_master_timeout= 5000;
|
||||
[ 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';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 0
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
Variable_name Value
|
||||
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 ]
|
||||
insert into t1 values (500);
|
||||
[ master status should be OFF ]
|
||||
|
@ -235,9 +230,6 @@ max(a)
|
|||
500
|
||||
connection master;
|
||||
[ 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';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 12
|
||||
|
@ -304,8 +296,6 @@ connection master;
|
|||
create table t1 (a int) engine = ENGINE_TYPE;
|
||||
drop table t1;
|
||||
connection slave;
|
||||
show status like 'Rpl_relay%';
|
||||
Variable_name Value
|
||||
[ test reset master ]
|
||||
connection master;
|
||||
reset master;
|
||||
|
@ -321,8 +311,7 @@ Rpl_semi_sync_master_yes_tx 0
|
|||
connection slave;
|
||||
include/stop_slave.inc
|
||||
reset slave;
|
||||
connection master;
|
||||
kill query _tid;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
connection slave;
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
|
@ -354,7 +343,7 @@ include/stop_slave.inc
|
|||
reset slave;
|
||||
connection master;
|
||||
reset master;
|
||||
kill query _tid;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set sql_log_bin=0;
|
||||
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
|
||||
flush privileges;
|
||||
|
@ -405,11 +394,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
|
|||
Variable_name Value
|
||||
Rpl_semi_sync_slave_status OFF
|
||||
connection master;
|
||||
kill query _tid;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
[ 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';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
|
|
|
@ -164,20 +164,15 @@ connection slave;
|
|||
connection slave;
|
||||
include/stop_slave.inc
|
||||
connection master;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set global rpl_semi_sync_master_timeout= 5000;
|
||||
[ 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';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 0
|
||||
show status like 'Rpl_semi_sync_master_yes_tx';
|
||||
Variable_name Value
|
||||
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 ]
|
||||
insert into t1 values (500);
|
||||
[ master status should be OFF ]
|
||||
|
@ -235,9 +230,6 @@ max(a)
|
|||
500
|
||||
connection master;
|
||||
[ 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';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_no_tx 12
|
||||
|
@ -304,8 +296,6 @@ connection master;
|
|||
create table t1 (a int) engine = ENGINE_TYPE;
|
||||
drop table t1;
|
||||
connection slave;
|
||||
show status like 'Rpl_relay%';
|
||||
Variable_name Value
|
||||
[ test reset master ]
|
||||
connection master;
|
||||
reset master;
|
||||
|
@ -321,8 +311,7 @@ Rpl_semi_sync_master_yes_tx 0
|
|||
connection slave;
|
||||
include/stop_slave.inc
|
||||
reset slave;
|
||||
connection master;
|
||||
kill query _tid;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
connection slave;
|
||||
include/start_slave.inc
|
||||
connection master;
|
||||
|
@ -354,7 +343,7 @@ include/stop_slave.inc
|
|||
reset slave;
|
||||
connection master;
|
||||
reset master;
|
||||
kill query _tid;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
set sql_log_bin=0;
|
||||
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl_password';
|
||||
flush privileges;
|
||||
|
@ -405,11 +394,8 @@ SHOW STATUS LIKE 'Rpl_semi_sync_slave_status';
|
|||
Variable_name Value
|
||||
Rpl_semi_sync_slave_status OFF
|
||||
connection master;
|
||||
kill query _tid;
|
||||
include/kill_binlog_dump_threads.inc
|
||||
[ 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';
|
||||
Variable_name Value
|
||||
Rpl_semi_sync_master_status ON
|
||||
|
|
|
@ -436,6 +436,9 @@ SET @@DEBUG_SYNC='now SIGNAL proceed_by_1000';
|
|||
--connection spoiler_21
|
||||
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
|
||||
--connection spoiler_22
|
||||
ROLLBACK;
|
||||
|
|
Loading…
Add table
Reference in a new issue