Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions sql/rpl_mi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions sql/sql_lex.h
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Comment on lines +374 to +377
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The term "connection" is slightly inaccurate in this context. While the demotion is initiated through a specific replication connection (channel), the operation transitions the server's role and affects the global GTID state. The original wording "transition this server" is more precise. Additionally, using standard capitalization for TRUE and avoiding backticks in the comment text maintains better consistency with the existing codebase style.

    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.
References
  1. Use standard capitalization for TRUE and avoid backticks in comments for consistency with the codebase style. (link)

*/
bool is_demotion_opt;
bool is_until_before_gtids;
bool show_all_slaves;
Expand Down
Loading