MDEV-26: Global transaction ID.
More fixes for race conditions in test cases.
This commit is contained in:
parent
0f266bc80e
commit
d639aece97
@ -6,6 +6,9 @@ INSERT INTO t1 VALUES (1, 0);
|
||||
include/stop_slave.inc
|
||||
CHANGE MASTER TO master_host = '127.0.0.1', master_port = MASTER_PORT,
|
||||
MASTER_GTID_POS=AUTO;
|
||||
SET sql_log_bin=0;
|
||||
FLUSH TABLES;
|
||||
SET sql_log_bin=1;
|
||||
INSERT INTO t1 VALUES (2,1);
|
||||
INSERT INTO t1 VALUES (3,1);
|
||||
include/start_slave.inc
|
||||
@ -23,6 +26,9 @@ SHOW BINLOG EVENTS IN 'master-bin.000001' LIMIT 1,1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Gtid_list # # []
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET sql_log_bin=0;
|
||||
FLUSH TABLES;
|
||||
SET sql_log_bin=1;
|
||||
include/start_slave.inc
|
||||
SET gtid_domain_id= 1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
@ -61,22 +67,37 @@ include/stop_slave.inc
|
||||
SET GLOBAL debug_dbug="+d,inject_crash_before_write_rpl_slave_state";
|
||||
START SLAVE;
|
||||
INSERT INTO t1 VALUES (4);
|
||||
SET sql_log_bin=0;
|
||||
FLUSH TABLES;
|
||||
SET sql_log_bin=1;
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL debug_dbug="+d,crash_commit_before";
|
||||
START SLAVE;
|
||||
INSERT INTO t1 VALUES (5);
|
||||
SET sql_log_bin=0;
|
||||
FLUSH TABLES;
|
||||
SET sql_log_bin=1;
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL debug_dbug="+d,crash_commit_after";
|
||||
START SLAVE;
|
||||
INSERT INTO t1 VALUES (6);
|
||||
SET sql_log_bin=0;
|
||||
FLUSH TABLES;
|
||||
SET sql_log_bin=1;
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL debug_dbug="+d,inject_crash_before_flush_rli";
|
||||
START SLAVE;
|
||||
INSERT INTO t1 VALUES (7);
|
||||
SET sql_log_bin=0;
|
||||
FLUSH TABLES;
|
||||
SET sql_log_bin=1;
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL debug_dbug="+d,inject_crash_after_flush_rli";
|
||||
START SLAVE;
|
||||
INSERT INTO t1 VALUES (8);
|
||||
SET sql_log_bin=0;
|
||||
FLUSH TABLES;
|
||||
SET sql_log_bin=1;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
|
@ -7,7 +7,7 @@ Master_Log_File = 'master-bin.000001'
|
||||
Using_Gtid = '0'
|
||||
CHANGE MASTER TO master_gtid_pos=AUTO;
|
||||
FLUSH LOGS;
|
||||
PURGE BINARY LOGS TO 'master-bin.000002';
|
||||
include/wait_for_purge.inc "master-bin.000002"
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000002 #
|
||||
|
@ -20,6 +20,9 @@ eval CHANGE MASTER TO master_host = '127.0.0.1', master_port = $MASTER_MYPORT,
|
||||
MASTER_GTID_POS=AUTO;
|
||||
|
||||
--connection server_1
|
||||
# Attempt to get tables closed and avoid "table ... is marked as crashed"
|
||||
# messages in error log.
|
||||
SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1;
|
||||
INSERT INTO t1 VALUES (2,1);
|
||||
INSERT INTO t1 VALUES (3,1);
|
||||
|
||||
@ -81,6 +84,7 @@ RESET MASTER;
|
||||
--replace_column 2 # 4 # 5 #
|
||||
SHOW BINLOG EVENTS IN 'master-bin.000001' LIMIT 1,1;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1;
|
||||
|
||||
--connection server_2
|
||||
--source include/start_slave.inc
|
||||
@ -97,7 +101,6 @@ FLUSH LOGS;
|
||||
--replace_column 2 # 4 # 5 #
|
||||
SHOW BINLOG EVENTS IN 'master-bin.000003' LIMIT 1,1;
|
||||
|
||||
#--remove_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||
wait
|
||||
EOF
|
||||
@ -150,6 +153,7 @@ EOF
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1;
|
||||
--let $wait_condition= SELECT COUNT(*) = 4 FROM t1
|
||||
--source include/wait_condition.inc
|
||||
|
||||
@ -175,6 +179,7 @@ EOF
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1;
|
||||
--let $wait_condition= SELECT COUNT(*) = 5 FROM t1
|
||||
--source include/wait_condition.inc
|
||||
|
||||
@ -200,6 +205,7 @@ EOF
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1;
|
||||
--let $wait_condition= SELECT COUNT(*) = 6 FROM t1
|
||||
--source include/wait_condition.inc
|
||||
|
||||
@ -225,6 +231,7 @@ EOF
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1;
|
||||
--let $wait_condition= SELECT COUNT(*) = 7 FROM t1
|
||||
--source include/wait_condition.inc
|
||||
|
||||
@ -250,6 +257,7 @@ EOF
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
SET sql_log_bin=0; FLUSH TABLES; SET sql_log_bin=1;
|
||||
--let $wait_condition= SELECT COUNT(*) = 8 FROM t1
|
||||
--source include/wait_condition.inc
|
||||
|
||||
|
@ -32,8 +32,8 @@ EOF
|
||||
|
||||
--connection server_1
|
||||
FLUSH LOGS;
|
||||
--source include/wait_for_binlog_checkpoint.inc
|
||||
PURGE BINARY LOGS TO 'master-bin.000002';
|
||||
--let $purge_binlogs_to=master-bin.000002
|
||||
--source include/wait_for_purge.inc
|
||||
--source include/show_binary_logs.inc
|
||||
INSERT INTO t1 VALUES (2);
|
||||
FLUSH LOGS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user