diff options
author | Alfranio Correia <alfranio.correia@oracle.com> | 2011-07-18 18:18:03 +0100 |
---|---|---|
committer | Alfranio Correia <alfranio.correia@oracle.com> | 2011-07-18 18:18:03 +0100 |
commit | e94de17f951582de66e6dad29b1304506daf4305 (patch) | |
tree | 045e03de93e7d0ce497903a3edb125a6b87f45d4 /sql/rpl_mi.h | |
parent | 25df755040116e3bc95c3d21cbabf0bbe309aa00 (diff) | |
download | mariadb-git-e94de17f951582de66e6dad29b1304506daf4305.tar.gz |
BUG#11809016 - NO WAY TO DISCOVER AN INSTANCE IS NO LONGER A SLAVE FOLLOWING MYSQL BUG#28796
Before BUG#28796, an empty host was used to identify that an instance was no
longer a slave. However, BUG#28796 changed this behavior and one cannot set
an empty host. Besides, a RESET SLAVE only cleans up information on the next
event to retrieve from the master, disables ssl and resets heartbeat period.
So a call to SHOW SLAVE STATUS after issuing a RESET SLAVE still returns some
valid information, such as host, port, user and password.
To fix this problem, we have introduced the command RESET SLAVE ALL that does
what a regular RESET SLAVE does and also clears host, port, user and password
information thus allowing users to identify when an instance is no longer a
slave.
Diffstat (limited to 'sql/rpl_mi.h')
-rw-r--r-- | sql/rpl_mi.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h index 2e06d3e8b94..1434ba45519 100644 --- a/sql/rpl_mi.h +++ b/sql/rpl_mi.h @@ -62,6 +62,7 @@ class Master_info : public Slave_reporting_capability Master_info(bool is_slave_recovery); ~Master_info(); bool shall_ignore_server_id(ulong s_id); + void clear_in_memory_info(bool all); /* the variables below are needed because we can change masters on the fly */ char master_log_name[FN_REFLEN]; @@ -113,7 +114,6 @@ class Master_info : public Slave_reporting_capability DYNAMIC_ARRAY ignore_server_ids; ulong master_id; }; -void init_master_log_pos(Master_info* mi); int init_master_info(Master_info* mi, const char* master_info_fname, const char* slave_info_fname, bool abort_if_no_master_info_file, |