summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_heartbeat_debug.test')
-rw-r--r--mysql-test/suite/rpl/t/rpl_heartbeat_debug.test52
1 files changed, 52 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test b/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test
new file mode 100644
index 00000000..bd66a249
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test
@@ -0,0 +1,52 @@
+# Testing master to slave heartbeat protocol, test cases that need debug build.
+
+--source include/have_debug.inc
+--source include/master-slave.inc
+
+connection slave;
+--source include/stop_slave.inc
+set @restore_slave_net_timeout= @@global.slave_net_timeout;
+--disable_warnings
+set @@global.slave_net_timeout= 10;
+--enable_warnings
+
+###
+### Checking the range
+###
+
+#
+# default period slave_net_timeout/2
+#
+--query_vertical show status like 'Slave_heartbeat_period';
+SET @saved_dbug= @@GLOBAL.debug_dbug;
+SET GLOBAL debug_dbug="+d,simulate_slave_heartbeat_network_error";
+CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error');
+CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again');
+--source include/start_slave.inc
+
+
+connection master;
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+CREATE TABLE t1 (a INT PRIMARY KEY);
+INSERT INTO t1 VALUES (1);
+
+sync_slave_with_master;
+
+--connection slave
+SELECT * FROM t1;
+
+connection master;
+drop table t1;
+
+connection slave;
+--source include/stop_slave.inc
+--disable_warnings
+SET GLOBAL debug_dbug=@saved_dbug;
+set @@global.slave_net_timeout= @restore_slave_net_timeout;
+--enable_warnings
+--source include/start_slave.inc
+
+--source include/rpl_end.inc