1include/master-slave.inc
2[connection master]
3[connection slave]
4set @restore_slave_net_timeout= @@global.slave_net_timeout;
5set @@global.slave_net_timeout= 10;
6SELECT LAST_HEARTBEAT_TIMESTAMP FROM performance_schema.replication_connection_status;
7change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
8Warnings:
9Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
10Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
11SELECT HEARTBEAT_INTERVAL FROM performance_schema.replication_connection_configuration;
12HEARTBEAT_INTERVAL	5.000
13change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 4294968;
14ERROR HY000: The requested value for the heartbeat period is either negative or exceeds the maximum allowed (4294967 seconds).
15SELECT HEARTBEAT_INTERVAL FROM performance_schema.replication_connection_configuration;
16HEARTBEAT_INTERVAL	5.000
17[connection slave]
18change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 0.0009999;
19Warnings:
20Warning	####	The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled.
21Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
22Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
23SELECT HEARTBEAT_INTERVAL FROM performance_schema.replication_connection_configuration;
24HEARTBEAT_INTERVAL	0.000
25change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 4294967;
26Warnings:
27Warning	####	The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout.
28Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
29Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
30SELECT HEARTBEAT_INTERVAL FROM performance_schema.replication_connection_configuration;
31HEARTBEAT_INTERVAL	4294967.000
32change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 0.001;
33Warnings:
34Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
35Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
36SELECT HEARTBEAT_INTERVAL FROM performance_schema.replication_connection_configuration;
37HEARTBEAT_INTERVAL	0.001
38reset slave;
39set @@global.slave_net_timeout= 5;
40change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 5.001;
41Warnings:
42Warning	####	The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout.
43Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
44Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
45SELECT HEARTBEAT_INTERVAL FROM performance_schema.replication_connection_configuration;
46HEARTBEAT_INTERVAL	5.001
47reset slave;
48set @@global.slave_net_timeout= 5;
49Warnings:
50Warning	1704	The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout.
51change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 4;
52Warnings:
53Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
54Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
55SELECT HEARTBEAT_INTERVAL FROM performance_schema.replication_connection_configuration;
56HEARTBEAT_INTERVAL	4.000
57set @@global.slave_net_timeout= 3 /* must be a warning */;
58Warnings:
59Warning	1704	The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout.
60reset slave;
61[connection master]
62drop table if exists t1;
63[connection slave]
64set @@global.slave_net_timeout= 10;
65change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 0.5;
66Warnings:
67Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
68Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
69SELECT HEARTBEAT_INTERVAL FROM performance_schema.replication_connection_configuration;
70HEARTBEAT_INTERVAL	0.500
71start slave;
72[connection master]
73create table t1 (f1 int);
74include/sync_slave_sql_with_master.inc
75include/check_slave_param.inc [Relay_Log_File]
76SELECT HEARTBEAT_INTERVAL FROM performance_schema.replication_connection_configuration;
77HEARTBEAT_INTERVAL	0.500
78A heartbeat has been received by the slave
79include/assert.inc [last_heartbeat_timestamp should not be empty]
80[connection master]
81drop table t1;
82include/sync_slave_sql_with_master.inc
83set @@global.slave_net_timeout= @restore_slave_net_timeout;
84[connection slave]
85include/stop_slave.inc
86CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD= 10;
87include/assert.inc [HEARTBEAT_INTERVAL should be 10.000]
88
89# Verify that heartbeat period is not reset to default implicitly and
90# received_heartbeat is not set to 0 by this.
91
92CHANGE MASTER TO MASTER_RETRY_COUNT= 3;
93include/assert.inc [HEARTBEAT_INTERVAL should be 10.000]
94include/assert.inc [COUNT_RECEIVED_HEARTBEATS should NOT be set to 0]
95include/stop_slave.inc
96Warnings:
97Note	3084	Replication thread(s) for channel '' are already stopped.
98RESET SLAVE;
99RESET MASTER;
100CHANGE MASTER TO MASTER_AUTO_POSITION;
101include/start_slave.inc
102include/assert.inc [HEARTBEAT_INTERVAL should still be 10.000 after RESET SLAVE.]
103include/stop_slave_io.inc
104CHANGE MASTER TO MASTER_HOST= 'localhost', MASTER_PORT= MASTER_PORT;
105include/start_slave.inc
106include/assert.inc [HEARTBEAT_INTERVAL should reset to default.]
107#
108# Change from default to make sure changing HOST resets heartbeat_interval
109# to default.
110#
111include/stop_slave_io.inc
112CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD = 10;
113include/start_slave.inc
114DROP TABLE IF EXISTS t1;
115include/sync_slave_sql_with_master.inc
116include/stop_slave.inc
117CHANGE MASTER TO MASTER_HOST= '127.0.0.1';
118include/start_slave.inc
119include/assert.inc [heartbeat_interval should reset to default on changing host.]
120DROP TABLE IF EXISTS t1;
121include/sync_slave_sql_with_master.inc
122#
123# Change from default to make sure changing PORT resets heartbeat_interval
124# to default.
125#
126include/stop_slave.inc
127CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD = 10;
128include/start_slave.inc
129DROP TABLE IF EXISTS t1;
130include/sync_slave_sql_with_master.inc
131include/stop_slave.inc
132CHANGE MASTER TO MASTER_PORT= MASTER_PORT;
133include/start_slave.inc
134include/assert.inc [heartbeat_interval should reset to default on changing port.]
135DROP TABLE IF EXISTS t1;
136include/sync_slave_sql_with_master.inc
137#
138# Change from default to make sure changing HOST and PORT resets
139# heartbeat_period to default.
140#
141include/stop_slave.inc
142CHANGE MASTER TO MASTER_HOST= '127.0.0.1', MASTER_PORT= MASTER_PORT;
143include/start_slave.inc
144include/assert.inc [heartbeat_interval should reset to default on changing host and port.]
145DROP TABLE IF EXISTS t1;
146include/sync_slave_sql_with_master.inc
147include/stop_slave.inc
148RESET SLAVE ALL;
149include/assert.inc [heartbeat_interval should reset to zero by RESET SLAVE ALL.]
150change master to master_host= '127.0.0.1', master_port= MASTER_PORT, master_user= 'root';
151Warnings:
152Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
153Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
154include/start_slave.inc
155DROP TABLE IF EXISTS t1;
156include/sync_slave_sql_with_master.inc
157include/rpl_end.inc
158