-
Shivji Jha authored
BUG#18777899 HEARTBEAT_PERIOD AUTOMATICALLY SETS TO DEFAULT POST RESET SLAVE COMMAND, BUG#18778485 SSL_VERIFY_SERVER_CERT AUTOMATICALLY SETS TO NO POST RESET SLAVE COMMAND) Problem: ======= There are three problems we address in this patch. The cause of these is more or less the same problem. But this exhibits different symptoms as described in the three bugs listed above, namely: 1) reset slave automatically sets heartbeat_period to default. 2) reset slave automatically sets ssl_verify_server_cert to default. 3) When a server is not configured as a slave (no CHANGE MASTER done yet), START SLAVE will fail and that is fine. But this resets the heartbeat_period to default which is strange and un-intuitive. Analysis: ======== The function init_master_log_pos() reset heartbeat_period to default and ssl_verify_server_cert= 0. This was called from reset slave as: reset_slave() => clear_in_memory_info() => init_master_log_info Fix: === 1) relocated code to reset heartbeat period to default to change_receive_options() and removed ssl_verify_server_cert= 0 in init_master_log_pos(). init_master_log_pos() is a different thing altogether, it shouldn't care about heartbeat or ssl certificate at all. 2) As a side-effect of (1), on a CHANGE MASTER if host and port are given but heartbeat_period is not specified, it remains 0 which means heartbeats are disabled. While adding/switching master, we want to keep heartbeat enabled by default. So in such a situation we force heartbeat_period to default heartbeat_count= 0 and last_heartbeat_timestamp= 0 unless the user specifically chooses to disable heartbeats.
Shivji Jha authoredBUG#18777899 HEARTBEAT_PERIOD AUTOMATICALLY SETS TO DEFAULT POST RESET SLAVE COMMAND, BUG#18778485 SSL_VERIFY_SERVER_CERT AUTOMATICALLY SETS TO NO POST RESET SLAVE COMMAND) Problem: ======= There are three problems we address in this patch. The cause of these is more or less the same problem. But this exhibits different symptoms as described in the three bugs listed above, namely: 1) reset slave automatically sets heartbeat_period to default. 2) reset slave automatically sets ssl_verify_server_cert to default. 3) When a server is not configured as a slave (no CHANGE MASTER done yet), START SLAVE will fail and that is fine. But this resets the heartbeat_period to default which is strange and un-intuitive. Analysis: ======== The function init_master_log_pos() reset heartbeat_period to default and ssl_verify_server_cert= 0. This was called from reset slave as: reset_slave() => clear_in_memory_info() => init_master_log_info Fix: === 1) relocated code to reset heartbeat period to default to change_receive_options() and removed ssl_verify_server_cert= 0 in init_master_log_pos(). init_master_log_pos() is a different thing altogether, it shouldn't care about heartbeat or ssl certificate at all. 2) As a side-effect of (1), on a CHANGE MASTER if host and port are given but heartbeat_period is not specified, it remains 0 which means heartbeats are disabled. While adding/switching master, we want to keep heartbeat enabled by default. So in such a situation we force heartbeat_period to default heartbeat_count= 0 and last_heartbeat_timestamp= 0 unless the user specifically chooses to disable heartbeats.
Loading