MDEV-15327 Reset Master_Server_Id to 0 on CHANGE MASTER#4666
Open
varundeepsaini wants to merge 1 commit intoMariaDB:mainfrom
Open
MDEV-15327 Reset Master_Server_Id to 0 on CHANGE MASTER#4666varundeepsaini wants to merge 1 commit intoMariaDB:mainfrom
varundeepsaini wants to merge 1 commit intoMariaDB:mainfrom
Conversation
32a74f7 to
9c49da8
Compare
gkodinov
requested changes
Feb 19, 2026
Member
gkodinov
left a comment
There was a problem hiding this comment.
Thank you for your contribution!
This is a preliminary review.
Please merge your changes into a single commit and have a commit message in it that follow CODING_STANDARDS.md.
I also have some cleanup suggestions below.
Master_Server_Id was not cleared after CHANGE MASTER or RESET SLAVE, showing a stale value until the slave reconnected. Reset master_id and prev_master_id to 0 in both code paths.
9c49da8 to
d88902b
Compare
gkodinov
approved these changes
Feb 19, 2026
Member
gkodinov
left a comment
There was a problem hiding this comment.
Thank you! Looks much better now. Please wait for the final review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Reset
Master_Server_Idto 0 onCHANGE MASTER TOandRESET SLAVE. Previously the stale value from the previous master persisted inSHOW SLAVE STATUSuntil the slave reconnected.Release Notes
CHANGE MASTER TOandRESET SLAVEnow resetMaster_Server_Idto 0, soSHOW SLAVE STATUSno longer reports a stale server ID from the previous master.How can this PR be tested?
Basing the PR against the correct MariaDB version
mainbranch.PR quality check