server icon indicating copy to clipboard operation
server copied to clipboard

MDEV-19248 Implement MASTER_BIND for CHANGE MASTER

Open ParadoxV5 opened this issue 8 months ago • 3 comments
trafficstars

  • [x] The Jira issue number for this PR is: MDEV-19248
    • Ports MySQL 5.6.2’s WL#3127, mysql/mysql-server@9174364

Description & Release Notes

Add CHANGE MASTER TO & SHOW REPLICA STATUS field Master_Bind that configures the MYSQL_OPT_BIND of the embedded replication client

The mariadb option MYSQL_OPT_BIND (--bind-address with MDEV-21465) chooses the network interface (e.g., eternet port) that connects to the server (the Master in this case).

What problem is the patch trying to solve?

MySQL Cluster had it for even longer than that, it was originally based on a patch I submitted internally at MariaDB AB somwhere around 2006 or so, back then due to replication between my two laptops somehow preferring slow WLAN even when having them connected by cable, too.

It was already insane to see how long this rather simple feature took to get merged into the MySQL codebase, then how long it took from making it from ndbcluster releases to the main server, and now some 15+ years later we are still having this pending here ...

⸺ @hartmut-mariadb, https://jira.mariadb.org/browse/MDEV-19248?focusedCommentId=266042#comment-266042

Knowledge Base pages that need changing

  • https://mariadb.com/kb/en/show-replica-status/
  • https://mariadb.com/kb/en/change-master-to/

How can this PR be tested?

good question. TODO: modify the automated test suite to verify that the PR causes MariaDB to behave as intended. If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.

PR quality check

  • [x] This is a new feature or a refactoring, and the PR is based against the main branch.
  • ~~This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.~~
  • [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • [ ] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

ParadoxV5 avatar Mar 10 '25 01:03 ParadoxV5