From 2464556cd45543c9ce580761584fdc40904272d6 Mon Sep 17 00:00:00 2001 From: ParadoxV5 Date: Sat, 23 May 2026 18:52:26 -0600 Subject: [PATCH] MDEV-20122: Remove `Master_info::is_demotion` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MDEV-20122 introduced this field, but it was never actually used. `CHANGE MASTER TO master_demote_to_slave=…` only uses the parser field `LEX_MASTER_INFO::is_demotion_opt` and is not recorded in either `@@master_info_file` or `@@relay_log_info_file`, as it takes effect during CHANGE MASTER rather than during replication. --- sql/rpl_mi.h | 8 -------- sql/sql_lex.h | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h index a3e9c553fe83c..c0925e9a02f7b 100644 --- a/sql/rpl_mi.h +++ b/sql/rpl_mi.h @@ -373,14 +373,6 @@ class Master_info: public Master_info_file, public Slave_reporting_capability Cache the value so future RESET SLAVE commands don't revert to Slave_Pos. */ bool &master_supports_gtid= master_use_gtid.gtid_supported; - - /* - When TRUE, transition this server from being an active master to a slave. - This updates the replication state to account for any transactions which - were committed into the binary log. In particular, it merges - gtid_binlog_pos into gtid_slave_pos. - */ - bool is_demotion= false; }; struct start_alter_thd_args diff --git a/sql/sql_lex.h b/sql/sql_lex.h index e86650716896d..e496247be328c 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -370,6 +370,12 @@ struct LEX_MASTER_INFO ulong server_id; uint port; int sql_delay; + /** + When `true`, transition this connection from an active master to a slave. + This updates the replication state to account for any transactions which + were committed into the binary log. In particular, it merges + `gtid_binlog_pos` into `gtid_slave_pos`. + */ bool is_demotion_opt; bool is_until_before_gtids; bool show_all_slaves;